[bt-devel] SVG to PNG conversion: try Inkscape

Jonathan Marsden jmarsden at fastmail.fm
Fri Feb 27 00:36:19 MST 2009


Greg Hellings wrote:

> Do you actually have the .png files?  I don't have anything installed
> on my system that will even acknowledge an SVG file, and I've never
> been able to successfully find a tool to do so.

I'd suggest that you try Inkscape.  http://www.inkscape.org

This is pretty much the canonical free SVG editor in the open source
world, as far as I know.  Inkscape runs on Linux, Windows 2000/2003/XP
(I'm not sure about Vista), OSX, FreeBSD, and  probably a few other OSes
too... and it can export to PNG.  As well as being a GUI editor, it has
some useful command line batch-oriented capabilities too.

For example, if you wanted to batch convert all .svg files in the
current directory to .png, you could just do something like

  for i in *.svg ; do inkscape $i -e ${i/.svg/.png} ; done

in a bash shell.  I expect I could conjure up an equivalent for the DOS
command line, if I had to, though it would not be as compact :)

I'm definitely no graphics guru, but I did try this out, and the
resulting PNG files to seem to be valid PNG files of reasonable-seeming
sizes.

If you need me to email you a tar.gz (or even a .zip) file containing
all 79 .png files I created (in about 14 seconds) by running the above
command in my bibletime-1.7 pics/icons/ directory, let me know :)

Jonathan




More information about the bt-devel mailing list