-
I have an SVG with embedded PNG images in it, like this:
But when I open it with Magick.NET and save it again like this: (obviously my real use case include some editing before saving again, but simply saving already "corrupts" the SVG)
all embedded images disappear. Everything else seems fine. Did I make any mistake, or is it unsupported to have embedded images? Maybe a bug? I'm using .NET Core on Windows and the latest Magick.NET-Q16-AnyCPU, Version: 7.21.1 Also tried with a bit older version, same thing happens. Any help is highly appreciated. Thanks! PS: I could not attach the SVG file (unsupported file type), but if needed I figure something out. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
You can zip this SVG file and then upload it. I suspect that loading embeded images is not supported but I will need to use your test file to make sure. |
Beta Was this translation helpful? Give feedback.
-
The problem appears to be that the data should be encoded differently: |
Beta Was this translation helpful? Give feedback.
-
This is what I see in the SVG file inside the zip. |
Beta Was this translation helpful? Give feedback.
The problem appears to be that the data should be encoded differently:
data:image/png;base64,
instead ofdata:image/png ;base64 ,
. Those spaces are not allowed by the code that parses the attribute.