automated fast svg to raster-image (e.g. png) conv

2019-03-30 23:35发布

I'm looking for a tool to convert 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).

标签: shell svg
3条回答
\"骚年 ilove
2楼-- · 2019-03-30 23:56

I you want to batch export whole or parts of SVG files to PNG in different sizes take a look at my tool inkmake.

查看更多
萌系小妹纸
3楼-- · 2019-03-31 00:04

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..

查看更多
家丑人穷心不美
4楼-- · 2019-03-31 00:06

It is possible using librsvg2

All the details are here

查看更多
登录 后发表回答