Convert SVG file to multiple different size PNG files

Mo Beigi picture Mo Beigi · Sep 16, 2011 · Viewed 17.8k times · Source

I have a logo image in SVG format and I am wondering if theres a way to generate multiple different sized png files.

Eg, I set 20 different width and height and it generates 20 PNG files. It okay if I have to do it 5 images at a time.

I have illustrator installed and cant figure out how to do this on it.

Thanks for all of your help!

Answer

zany picture zany · Apr 15, 2013

The accepted answer is fine. There is an official help on options available. Also basic Shell commands will do nicely here:

for x in 10 100 200 ; do inkscape --export-png logo${x}.png -w ${x} logo.svg ; done

On the command line in windows use this line from @avalancha in the comments

for %x in (100 200 300) ; do inkscape --export-png logo%x.png -w %x logo.svg ; done