automated fast svg to raster-image (e.g. png) conversion
I'm looking for a tool to c开发者_开发百科onvert an svg to a raster-image (png for instance) from a shell script (bash).
Currently I use inkscape --export-png=image.png --export-area-drawing image.svg
which works well, but is terribly slow.
Searching the Web and SO only gets me libraries to do this inside some programming language (php, js, C#, ...). I could write myself a small program to do this, but I would prefer an existing tool (other than inkscape as it is quite slow).
It is possible using librsvg2
All the details are here
The ImageMagick library also has command-line tools that can do this. While it certainly supports SVG I'm not sure if it will give the same quality of results as InkScape unless your svg's are fairly simple..
I you want to batch export whole or parts of SVG files to PNG in different sizes take a look at my tool inkmake.
精彩评论