Categories
Uncategorized

GpsMid icons or how to convert svg to png with ImageMagick

I’m working on a new set of icons for GpsMid. If you’re curious how they look check here. The full set of svg and pngs and a sample GpsMid midlet is here. The pngs were created using”Export as bitmap” function in Inkscape, but now I found a better solution: ImageMagick. I started with simple:

convert i_about.svg i_about.png

but the generated icon was too small:

I wanted 100×100 pixels with transparent background. Next I tried: 

convert i_about.svg -extent 100x100 i_about.png

but again, the result was not good enough:

Adding -geometry helped a little bit:

The image is very fuzzy. To solve it we have to add -density option.

Now it looks quite good except for the missing piece – a transparent background. “-background none” solves the last issue: 

convert -density 1000x1000 -background none i_about.svg -geometry 100x100 i_about.png 

This is my perfect 😉 icon for GpsMid!

Leave a Reply

Your email address will not be published. Required fields are marked *