tags:

views:

3031

answers:

5
+3  Q: 

Convert PNG to SVG

How could I convert a PNG image to a SVG?

+2  A: 

You may want to look at potrace.

Michael Krelin - hacker
+5  A: 

A png is a bitmap image style and an SVG is a vector-based graphics design which supports bitmaps so it's not as if it would convert the image to vectors, just an image embedded in a vector-based format. You could do this using http://www.inkscape.org/ which is free. It would embed it, however it also has a Live Trace like engine which will try to convert it to paths if you wish (using potrace). See live trace in adobe illustrator (commericial) is an example:

http://graphicssoft.about.com/od/illustrator/ss/sflivetrace.htm

Nissan Fan
I've used the live trace in Inkscape to re-create logos with long lost originals. Unless the latest version has made some improvements, it is a bit hit-or-miss. Having said that, I've also manually traced some logos in Inkscape and managed quite fine.
AnonJr
+1  A: 

There's a variety of free, open source software to do that; potrace, for instance.

moonshadow
A: 

I'm assuming that you wish to write software to do this. To do it naively you would just find lines and set the vectors. To do it intelligently, you attempt to fit shapes onto the drawing (model fitting). Additionally, you should attempt to ascertain bitmaped regions (regions you can't model through shames or applying textures. I would not recommend going this route as that it will take quite a bit of time and require a bit of graphics and computer vision knowledge. However, the output will much and scale much better than your original output.

monksy
+1  A: 

There is a website where you can upload your image, and see the result.

http://vectormagic.com/home

But if you want to download your svg-image, you need to register. (if you register, you get 2 images for free) (Sorry for the bad English, im Dutch)

FrankkieNL