The Imaging library is not respecting the positioning of all elements within an SVG. Attached shows the problem area, displays fine within a browser but the Imaging library fails to render appropriately.
Hi Kevin,
Thanks for inquiring Aspose.Imaging.
I have observed the information shared by you. Can you please share the used sample code and generated output file with us. I also request you to please try using Aspose.Imaging for .NET 17.4 on your end as well before sharing further information with us.
Many Thanks,
I am currently using version 17.4, here is the code I use to convert the svg to png.
string svgContent;
using (FileStream fs = new FileStream(@“C:\Itst\temp\SvgData.txt”, FileMode.Open, FileAccess.Read))
{
using (StreamReader sr = new StreamReader(fs))
{
sr.BaseStream.Seek(0, SeekOrigin.Begin);
svgContent = sr.ReadToEnd();
}
}
byte[] data = Encoding.ASCII.GetBytes(svgContent);
using (MemoryStream writer = new MemoryStream())
{
writer.Write(data, 0, data.Length);
using (Aspose.Imaging.FileFormats.Svg.SvgImage svgImage = (Aspose.Imaging.FileFormats.Svg.SvgImage)Aspose.Imaging.Image.Load(writer))
{
svgImage.Save(@“C:\Itst\temp\svg.png”, new Aspose.Imaging.ImageOptions.PngOptions());
}
}
We are sorry for your inconvenience,
The issues you have found earlier (filed as IMAGINGNET-2380) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by mudassir.fayyaz
The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.