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)
_fn6kqqvg9.zip (1.5 KB)
Code
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();
license.SetLicense(“Aspose.Total.lic”);
Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();
pngOptions.ResolutionSettings = new Aspose.Imaging.ResolutionSetting(72, 72);
chartImage.Save(fileName, pngOptions);
}
}