Svg to Jpeg conversion - empty result
Posted: 2016-01-06T05:34:13-07:00
When I convert a particular SVG file to JPG, I get an empty JPG file (the whole image is white).
I use the latest version of Magick.NET (v7.0.0.0) with .NET 4.5.
I tried to convert this SVG file to Jpeg:
http://www.filedropper.com/svgphototssp ... elayout100
I use the following code for the conversion:
My first guess was that the embedded image in the SVG is invalid, but it is not.
I read the embedded jpeg image data from this SVG file, decoded from base 64, and saved as .jpg file, and I found that it was a valid .jpg file.
Thank you for the help in advance!
I use the latest version of Magick.NET (v7.0.0.0) with .NET 4.5.
I tried to convert this SVG file to Jpeg:
http://www.filedropper.com/svgphototssp ... elayout100
I use the following code for the conversion:
Code: Select all
MagickReadSettings readSettings = new MagickReadSettings()
{
Format = MagickFormat.Svg
};
using (MagickImage image = new MagickImage(svgFilePath, readSettings))
{
image.Format = MagickFormat.Jpeg;
image.Write(Path.ChangeExtension(svgFilePath, "jpg"));
}
I read the embedded jpeg image data from this SVG file, decoded from base 64, and saved as .jpg file, and I found that it was a valid .jpg file.
Thank you for the help in advance!