Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have bunch of SVG icons that I'd like to use for my application to be developed in VB.Net 2010, and since it has no support to handle SVG icons, I need to convert those icons into either PNG or ICO, with preferred output resolution. I've found such command-line tool for Ubuntu called rsvgconvert. Do we have any such tool for Windows as well??

share|improve this question
add comment

5 Answers 5

up vote 6 down vote accepted

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.

share|improve this answer
add comment

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-png=out.png

share|improve this answer
1  
Why do you say inkscape is better than ImageMagick? I don't disagree (or agree), just curious for more details. –  Sam May 24 at 17:29
add comment

InkscapeBatch does the job on Windows. Requires Inkscape.

share|improve this answer
add comment

ImageMagick is available for Windows and can convert between SVG and PNG and ICO (among others). You can set size and other attributes for the output file.

share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.