When saving as SVG- pictures in slide are poorly rasterized in SVG file

How can I improve the rasterization of pictures in a PowerPoint slide when saving as SVG? The first additional attachment is a 1440x1080 JPG generated with getThumbnail(). The second is an SVG (saved as a JPG, since your forum won’t accept SVG files, buts its the result of saveAsSVG). Note the image quality of the logo at the top left - much better in the thumbnail than in the SVG, especially when displayed at the higher resolution. I tried playing with setJPEGQuality and the rasterization DPI options, but can’t seem to get any improvement.



Thanks,

Bob Taylor

Hi Bob,


Thank you for considering Aspose.Slides.

I have observed your comments and like to share with you that the svg file you have shared with us an a jpg image may have got corrupted. I request you to please share with us the svg image.as well as the sample code which you are using on your end. You can attach the svg image as a zip file. Also, I request you to please try using Aspose.Slides for Java 15.5.1 on your end first,

Please let us know if the issue persists. We will be happy to assist you further.

Best Regards,

I will install the latest version, but I think the fundamental issue is the saveAsSVG is setting the size and view port to be 720 x 540 - here is the XML from the generated SVG…

Is there a way to change the viewBox, similar to how with getThumbnail() you can pass it a width/height Dimension to scale the image to whatever you want?

Thanks, Bob

Your form didn’t seem to encode the tags of the XML, I posted, so here is another attempt…

Is there a way to change the viewBox to something other than 720x540, similar to how in getThumbnail() you can pass a width/height dimension?

Thanks, Bob

I was able to change the slide width and height prior to saveAsSVG using .getSlideSize().setSize() - it worked to make the viewport of the SVG larger, but it did not scale the objects on the page - is there a way to scale the slide to double the size (slide and objects)? This would be a workaround if there is no way to change the viewport on the saveAsSVG. Thanks, Bob

Hi Bob,

I have observed your requirement for enhanced size chart
object in slide SVG. There is no option to set the resolution of image
in SVG. However as a workaround, you can increase the slide size on
run-time to a desired size and generate the slide SVG image. I have
shared the sample code with you in another forum thread
as well regarding enhancing slide size and ultimately increasing the
respective shapes size on slides. I hope this will be helpful.

Many Thanks,