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).
Use Adobe Photoshop to convert SVG images to PNG images. Get lossless compression, preserve image resolution, and lower your file size by converting from SVG to PNG. Use Photoshop for a fast way to turn large file formats into smaller, easier-to-use graphic types.
PNGs and SVGs support transparency — so they're both excellent choices for online logos and graphics. It's worth noting that PNGs are one of the best choices for a raster-based transparent file. If you're working with pixels and transparency, PNGs are a better option than SVGs.
Cairo graphics can be converted into vector files as PostScript, PDF, and SVG, can be output on various screen display modes on Linux and Macintosh systems, or can be used to generate raster images.
It is possible using librsvg2
All the details are here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With