[SOLVED] Blob: Linux vs. Windows(MinGW)
Re: Blob: Linux vs. Windows(MinGW)
Building and running this example on Cygwin is more or less like testing it on Linux (and it works there), so I think that's the reason it works for you. MinGW is native.
Re: Blob: Linux vs. Windows(MinGW)
dlemstra: Where you able to replicate on Windows?
I also tested on OSX, works fine there (same IM build as on Linux and Windows).
I also tested on OSX, works fine there (same IM build as on Linux and Windows).
Re: Blob: Linux vs. Windows(MinGW)
I am unable to replicate your issue. Works perfect with the code that you provided. I really think that you are not using librsvg but MSVG instead. That coder uses temporary files to read SVG files.
Re: Blob: Linux vs. Windows(MinGW)
Then I should get the same issue if I ping the blob or read the file directly(?)
librsvg is built-in, and I have other stuff using SVG without problems that requires librsvg on the same build (also in the same code). This only happens if I read a blob with SVG, ping blob works, read file works, other file formats in blob works.
Currently my only option is to write the string to a file and then open it again, not something I want to do just for Windows (read/write to disk is also no option for my current project).
librsvg is built-in, and I have other stuff using SVG without problems that requires librsvg on the same build (also in the same code). This only happens if I read a blob with SVG, ping blob works, read file works, other file formats in blob works.
Currently my only option is to write the string to a file and then open it again, not something I want to do just for Windows (read/write to disk is also no option for my current project).
Re: Blob: Linux vs. Windows(MinGW)
EDIT, removed.
Re: Blob: Linux vs. Windows(MinGW)
Sorry for steering you in the wrong direction but I finally figured out what is happening by using the Visual Studio debugger. The SVG delegate does not support reading/writing from blobs and that is why it first writes the blob data to a temporary file. This has nothing to do with the delegate (msvg/librsvg) that is being used.
Still doesn't make sense why that would fail on MinGW and works perfectly on WIN10 here.
Still doesn't make sense why that would fail on MinGW and works perfectly on WIN10 here.
Re: Blob: Linux vs. Windows(MinGW)
Ahh, ok. I did a -list format and noticed that blob was not supported.
I'm thinking about rewriting what I need against librsvg, since I would want to avoid writing and reading from disk. But would be nice to use IM since I already link against it.
Btw, is it hard adding SVG-support for the Blob? I could probably take a look if you could point me in the right direction (what files to modify etc).
I'm thinking about rewriting what I need against librsvg, since I would want to avoid writing and reading from disk. But would be nice to use IM since I already link against it.
Btw, is it hard adding SVG-support for the Blob? I could probably take a look if you could point me in the right direction (what files to modify etc).
Re: Blob: Linux vs. Windows(MinGW)
So, I rewrote everything against pure librsvg. Thanks for your time (and patience).
Re: [SOLVED] Blob: Linux vs. Windows(MinGW)
Did you manage to use a blob instead of a file? I took a quick look at the documentation but I was unable to find a way to do this.
Re: [SOLVED] Blob: Linux vs. Windows(MinGW)
I used rsvg_handle_new_from_data to read the iostream I have.
https://developer.gnome.org/rsvg/stable ... -from-data
https://developer.gnome.org/rsvg/stable ... -from-data