Batch convert SVG images to desired size PNG or ICO

ImageMagick should not immediately associate to just any batch task involving images. Especially in this case where ImageMagick is poor solution for SVG conversion.

Better try Inkscape on command line:

inkscape in.svg --export-type=png --export-filename=out.png


ImageMagick has a command line tool that is available for Linux and Windows (and others). The converter tool is conveniently called "convert". Here's some usage documentation.

And here's where you can get a Windows installer.


The command line did not work out of the box, plus I wanted 100 files to be converted. Here is how I made it work with windows 7:

  1. install inkscape - not the portable one!

  2. copy all your svg files in one folder, e.g. "C:\svgs\" there:

  3. you create a convert.bat file with this line inside:

    FOR %%A IN (*.svg) DO "C:\Program Files (x86)\Inkscape\inkscape.exe" --export-png=%%A.png
    

    (point to the correct folder of your installation):

  4. open the CMD as admin! To do so, hit the WIN key, type cmd, right click on "cmd.exe" and select "Run as administrator".

  5. navigate to your "C:\svgs\" and type convert.bat -- All svg-files will be converted to PNGs.

  6. Use Windows Explorer to search for the converted PNG files. On my PC they were in folder: C:\Users\myname\AppData\Local\VirtualStore\Program Files (x86)\Inkscape\svgs

Hope that helps.


As the resolution for the command line could only be set fixed as far as I could see, I ended up using the InkscapeBatch tool. There I could set the DPI to increase all images relatively.

You need to specify the correct settings or it will not work. Here is what I did:

enter image description here

enter image description here

After you hit "Finish", you need to press the button "Start batch converter..." in the toolbar:

enter image description here