Free Support Forum -

SVG not properly converted to PNG (C#)

Hi ,
I have a Aspose Total license , I have started to use Aspose.Imaging.17.1.0 nuget, for converting svg to image. but the image generated is in single color (black) where as the svg looks different.
can you please help here.

Attaching the SVG and generated image here.

15d925b7-595e-4e93-96e2-6e7f703b098a.png (11.0 KB) (1.5 KB)


using (MemoryStream ms = new MemoryStream(chartImageBytes))
using (Aspose.Imaging.FileFormats.Svg.SvgImage chartImage = (Aspose.Imaging.FileFormats.Svg.SvgImage)Aspose.Imaging.Image.Load(ms))
Aspose.Imaging.License license = new Aspose.Imaging.License();
Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();
pngOptions.ResolutionSettings = new Aspose.Imaging.ResolutionSetting(72, 72);
chartImage.Save(fileName, pngOptions);


I have worked with source file and sample code shared by you using Aspose.Imaging 19.4 and unable to observe issue. I have also shared my generated result with you for your kind reference. Please check attachment. Can you please try to use Aspose.Imaging latest version on your end and share feedback with us if there is still an issue.result12345.png (4.0 KB)