Convert SVG into PNG in Perl

Having a SVG file I would like to convert such graphics into PNG format and print it to output (not file), with option to set width or height of the PNG image (in pixels), keeping the original aspect ratio of SVG graphics. How can I do this in Perl ?


You can try SVG::Rasterize. I've done this with complex SVGs using Apache batik, which is built in Java.


ImageMagick has reasonable SVG support with the rsvg library as backend. Make sure you have it installed.

链接地址: http://www.djcxy.com/p/18320.html

上一篇: SVG渲染错误

下一篇: 在SVG中将SVG转换为PNG