[Toolserver-l] what's the best way to convert SVGs to PNGs on the toolserver?

Ryan Kaldari kaldari at gmail.com
Mon Feb 15 23:53:07 UTC 2010


I'm currently working on some tools to allow web-based creation of various
types of maps for people that aren't comfortable editing SVG files. These
tools will allow users to select a base map, choose which territories they
want to shade in and how to shade them, generate an SVG file, and then push
it to Commons. I have pretty much everything working except I would like to
be able to show the user a PNG preview of their map before it is pushed to
Commons. I tried using ImageMagick, but it gives horrible results. Has
anyone else dealt with this problem on the toolserver? I've heard of a
couple other possible solutions:
1. SVG2image, which is a PHP class that uses the Batik Java library to do
the conversion. Apparently this is difficult to set-up, however, and may not
work under PHP 5.
2. The librsvg library. Apparently this library may have some security
problems, however, and reports of its ability to do decent conversions are
mixed.
3. Calling inkscape from the command line. I doubt this is available on the
toolserver, but who knows.

Any ideas would be appreciated. Thanks.

Ryan Kaldari
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wikimedia.org/pipermail/toolserver-l/attachments/20100215/4a89ce90/attachment.htm 


More information about the Toolserver-l mailing list