Raster to vector conversions with potrace and cocoapotrace

FOSS to the rescue again ...

If you work with computers sooner or later you're going to find you need an image that is in a raster (AKA bitmap) format (e.g. .gif, .jpg, .wmf) translated to a vector format (e.g. .svg, .cgm, .dwg).

While there are any number of commercial products that will do raster to vector conversions for you such as Adobe Illustrator Live Trace feature or Avia Systems Scan2CAD but at $530 and $700 respectively these aren't tools that you'll just keep around if you're not doing some serious graphics work.

For anyone who just needs to do the occasional conversion I have a great solution for you: potrace. Free and open source, potrace is a command line tool that's available for Linux, Windows, OS X, several BSD flavors, AIX, and AROS [see note at end].

potrace is a "death by options" tool that can convert file in pnm (pbm, pgm, ppm) and bmp formats into eps, postscript, ps, pdf, pdfpage, svg, dxf, geojson, pgm, gimppath, and xfig formats. The only limitation is that potrace can't handle color images.

Of course not everyone likes command line tools (as you get older learning yet another obscure set of command line switches gets evermore tedious) so if you'd prefer a graphical frontend it turns out you have a few to choose from.

For OS X I rather like cocapotrace which I wouldn't have known about except for a recent blog post by David Malki!, the creator of one of my favorite cartoons, Wondermark. Weirdly it seems that cocoapotrace is only available from an obscure Japanese Geocities web site. As Malki! notes "every time I think about updating my version of OS X, I'm terrified that it'll break the program's compatibility and I'll be up a creek. I've made the decision multiple times in the past that a working version of Cocoapotrace is worth more to me on a day-to-day helpfulness basis than all the other features of a new OS." That a professional artist would hold a FOSS utility in such esteem speaks volumes.

So, the next time you need to do a raster to vector conversion, look no further than potrace on Sourceforge or, if you're a Mac user, cocoapotrace in Japan which, I guess, is a pretty long way to look.

Outline your comments below or to gearhead@gibbs.com then follow me on TwitterApp.net, and Facebook.

Note: AROS, if you haven't come across it, is a FOSS operating system derived from and compatible with AmigaOS and ports of it have ben demoed "on the Sam460ex from ACube, the FPGA Arcade Replay from FPGA Arcade, and the Raspberry PI from the Raspberry PI Foundation." 

Join the Network World communities on Facebook and LinkedIn to comment on topics that are top of mind.
Must read: 10 new UI features coming to Windows 10