Image to SVG conversion with Python
nobody at nowhere.com
Mon Nov 16 18:58:07 CET 2009
On Mon, 16 Nov 2009 07:19:49 -0800, Carlo DiCelico wrote:
> I need to convert JPEG and PNG files to SVG. I'm currently using PIL
> to generate the JPEG/PNG files to begin with. However, I need to be
> able to scale the generated images up in size without a loss of image
> quality. Using SVG seems to be the best way to do this, other than
> generating the images in the maximum size/resolution in the first
> place, which would be too resource intensive.
> I've looked around online and have found some tools for creating SVGs
> but none for converting an image into SVG.
> Does anyone have any experience doing this? What would be the best way
> to go about this?
JPEG/PNG are raster formats, SVG is a vector format.
To convert raster graphics to vector graphics, you need a "tracing"
program (aka "image tracing", "vector tracing", "vectorizing"), e.g.
potrace (this program is often bundled with InkScape):
More information about the Python-list