Image is corrupted after converting SVG To Raster Format


I tried to convert .svg imge into .png using the example
and found that the final .png is very different from the original .svg (not-existed lines were added).
I also tried to change values CompressionLevel, ColorType, FilterType of PngOptions but this did not help.

Here is my code:

’ Load an existing SVG image as Image
Dim objImage As Aspose.Imaging.Image = Aspose.Imaging.Image.Load(SourcePath)

        ' Convert the Image to SvgImage
        Using Image As Aspose.Imaging.FileFormats.Svg.SvgImage = DirectCast(objImage, Aspose.Imaging.FileFormats.Svg.SvgImage)
            Dim Options As New Aspose.Imaging.ImageOptions.PngOptions
            'Options.CompressionLevel = 0
            'Options.ColorType = Aspose.Imaging.FileFormats.Png.PngColorType.Truecolor
            'Options.FilterType = Aspose.Imaging.FileFormats.Png.PngFilterType.Adaptive

            Image.Save(OutputPath, Options)
        End Using

Here is demo application with test .svg image:



I have worked with files shared by you and have been able to observe the issue. An issue with ID IMAGINGNET-2462 has been logged into our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,



The issues you have found earlier (filed as IMAGINGNET-2462) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by Aspose Notifier.

Please try using following sample code on your end.

string inputFileName = @"D:\test.svg";
            string outFileName = @"D:\test.png";

            using (Image image = Image.Load(inputFileName, new SvgLoadOptions() { DefaultHeight = 1080, DefaultWidth = 1920 }))
                image.Save(this.GetFileInOutputFolder(outFileName), new PngOptions()
                    VectorRasterizationOptions = new SvgRasterizationOptions()
                        PageSize = image.Size