Page 2 of 2

Re: Blob: Linux vs. Windows(MinGW)

Posted: 2016-04-05T13:51:39-07:00
by olear
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)

Posted: 2016-04-08T00:39:59-07:00
by olear
dlemstra: Where you able to replicate on Windows?

I also tested on OSX, works fine there (same IM build as on Linux and Windows).

Re: Blob: Linux vs. Windows(MinGW)

Posted: 2016-04-08T02:18:26-07:00
by dlemstra
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)

Posted: 2016-04-08T02:40:08-07:00
by olear
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).

Re: Blob: Linux vs. Windows(MinGW)

Posted: 2016-04-08T03:05:13-07:00
by olear
EDIT, removed.

Re: Blob: Linux vs. Windows(MinGW)

Posted: 2016-04-08T04:24:09-07:00
by dlemstra
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.

Re: Blob: Linux vs. Windows(MinGW)

Posted: 2016-04-08T04:46:04-07:00
by olear
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).

Re: Blob: Linux vs. Windows(MinGW)

Posted: 2016-04-09T10:48:58-07:00
by olear
So, I rewrote everything against pure librsvg. Thanks for your time (and patience).

Re: [SOLVED] Blob: Linux vs. Windows(MinGW)

Posted: 2016-04-09T13:06:37-07:00
by dlemstra
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)

Posted: 2016-04-10T08:00:24-07:00
by olear
I used rsvg_handle_new_from_data to read the iostream I have.

https://developer.gnome.org/rsvg/stable ... -from-data