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

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
olear
Posts: 58
Joined: 2015-05-24T10:56:42-07:00
Authentication code: 6789

Re: Blob: Linux vs. Windows(MinGW)

Post 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.
olear
Posts: 58
Joined: 2015-05-24T10:56:42-07:00
Authentication code: 6789

Re: Blob: Linux vs. Windows(MinGW)

Post 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).
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Blob: Linux vs. Windows(MinGW)

Post 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.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
olear
Posts: 58
Joined: 2015-05-24T10:56:42-07:00
Authentication code: 6789

Re: Blob: Linux vs. Windows(MinGW)

Post 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).
olear
Posts: 58
Joined: 2015-05-24T10:56:42-07:00
Authentication code: 6789

Re: Blob: Linux vs. Windows(MinGW)

Post by olear »

EDIT, removed.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Blob: Linux vs. Windows(MinGW)

Post 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.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
olear
Posts: 58
Joined: 2015-05-24T10:56:42-07:00
Authentication code: 6789

Re: Blob: Linux vs. Windows(MinGW)

Post 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).
olear
Posts: 58
Joined: 2015-05-24T10:56:42-07:00
Authentication code: 6789

Re: Blob: Linux vs. Windows(MinGW)

Post by olear »

So, I rewrote everything against pure librsvg. Thanks for your time (and patience).
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

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

Post 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.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
olear
Posts: 58
Joined: 2015-05-24T10:56:42-07:00
Authentication code: 6789

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

Post by olear »

I used rsvg_handle_new_from_data to read the iostream I have.

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