October 26, 2021

Convert SVG to PNG | Batch processing | Resize

The easiest way to convert a collection of SVG files to a raster format is to use a NodeJS application called svg2png. The utility program produces a high-quality, fully resized output file.

From the terminal, install svg2png:

npm install -g svg2png

Run svg2png from the command line and adjust the parameters based on the instructions. For example, you can batch-convert a directory full of SVG files to properly-sized PNGs (64 pixels-wide, in this case) with a single command line, as follow:

for f in *.svg; do svg2png "$f" -o "${f%.*}.png" -w 64; done;




Leave a Reply

Your email address will not be published.

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram