Tracing Bitmaps to Vector - When You Need an Alternative to Cocoapotrace
Cocoapotrace is a fantastic utility for Mac OS X that traces bitmap images into vector art. It's exceptionally great at tracing comic line art scans turning them into clean yet still expressive and accurate with line quality vector art.
Here's a screenshot of Cocoapotrace:
Krishna Sadasivam of PC Weenies wrote a great article on Cocoapotrace that delves more into its wonders.
What if you have trouble running Cocoapotrace? One of my machines just won't launch it and I have yet to narrow down why.Thankfully, there's two other great options that use the same engine that Cocoapotrace uses.
Option 1: Using Potrace via Command Line
Two utilities are what's at work behind the scenes for Cocoapotrace: mkbitmap and potrace. First the BMP is cleaned up, resized, then run through a highpass filter which is done by mkbitmap. Afte that, the conversion to vector art is done by potrace. We don't have to use the convenient UI of Cocoapotrace if we don't want to or if we're having trouble with it running... we can run the command line programs instead!
1) Download and install/unzip Potrace. Convert your bitmap/raster artwork to a BMP file.
2) From the Terminal, run mkbitmap giving it the proper settings and point it to your BMP file.
./mkbitmap -f 4 -s 2 -t 0.45 ./comic.bmp -o comic-processing.pbm
3) From the terminal, now run potrace giving it the proper settings and pointing it to the PBM file produced in step 2.
./potrace -t 2 -z minority -a 1 -u 10 -O 0.2 ./comic-processing.pbm
4) Done! View your EPS file in your vector program of choice.
If your results aren't to your liking, it's time to fiddle with the settings and repeat steps 2 - 4.
For those that hate using the command line - I can undersand (but consider giving it a try - there's so much power to be had with exploring the command line) there's another option: InkScape!
Option2: Using Potrace via InkScape
InkScape is an open source competitor to Adobe Illustrator. Overall InkScape is a very capable tool and I've used it for a few print projects before I bought a license for the Adobe Creative Suite.
1) Download, install, run InkScape
2) Import your raster/bitmap artwork.
3) Run the "Trace Bitmap" option.
4) Adjust settings, see the results, tweak to your liking.
Oddly enough it took me longer to figure out the settings I prefer in InkScape than it did via the command line. That's probably due to the great how-to article on potrace's site with all the command line examples. I was considering writing a GUI for Potrace when I ran into trouble running it but now I've tried these other options that project is off my to-do list. If you're having trouble running Cocoapotrace on your Mac, the command line and InkScape are two great alternatives.
You may ask "Why run all this when you have Illustrator's Live Trace?". So far, I've had more trouble and spend more time to get results that I don't like as much as the quality of line art I can get from Cocoapotrace. I hope to see Live Trace improve (perhaps Adobe will license Potrace's technology!), but in the meanwhile I have alternatives that I'm quite pleased with.