Cocoapotrace: The Easy Way to Go from Raster to Vector line art

Illustrators and cartoonists looking for an easy way to convert their raster images to vector should definitely get their hands on Cocoapotrace. (Tip o’ the hat to Ray Frenden for the heads-up on this application!)

Cocoapotrace supports JPEG, TIFF, PNG, GIF, JP1, PICT, BMP, QTIF, and PSD files and will output the resultant vectorized file as an EPS.

Before I take a closer look at the program, let’s step back and look at raster vs. vector.

Below is an image I drew using Corel Painter X:

Raster to Vector using Cocoapotrace

It doesn’t look half bad until I zoom into the drawing, whereupon you can start to see “jaggies”. This is a function of raster-based images, which are based on pixels.

Raster to Vector using Cocoapotrace

Here is the same image, after using Cocoapotrace to convert it into a vector-based file.

Raster to Vector using Cocoapotrace

When I zoom in, notice how sharp the line quality looks. There’s nary a jagged pixel to be found, and that’s because the file uses curves instead of points to display the line. We call these curve-based images vectorized.

Raster to Vector using Cocoapotrace

The advantage of a vectorized file over its raster counterpart is simple. Since the vectorized image is based on curves, the image can be scaled up and down with no affect on quality while maintaining the same file size. So an 11″ x 17″ vectorized image would be no more heavier than a 300 x 300 sized vector image.

Now that we’ve covered the basics between raster and vector, let’s look at Cocoapotrace. Below is a screen capture of the main Cocoapotrace window. To convert an image to vector, you simply drag your bitmap image to the left box (labeled bitmap). You can fiddle with the settings, but I kept the default values and hit the Update button.

raster to vector using Cocoapotrace

Within seconds your file is converted to a vector format. You can now save it out as an EPS (Encapsulated PostScript) file and take it into Illustrator.

Documentation for Cocoapotrace is non-existent. I suspect that trial-and-error is the only way to determine how the various settings will affect the vectorized drawing. But, on the plus side, it’s free.

Cocoapotrace is built for MacOS X, but its Windows counterpart, dubbed Potrace, is also available. From what I’ve seen, this program is light years ahead of using Illustrator’s “Live Trace” option.

In summary, while the documentation leaves a lot to be desired, Cocoapotrace does a superb job of converting raster-based images to vector ones.

Check it out!

-Krishna

These beautiful and intelligent people wrote

  • Tovias
    May 1, 2011 at 9:30 pm

    I will definitely be checking out this application. When I first started doing comics I was using a program called Adobe Streamline. I’d draw my comics on paper, scan them in and then convert them to Vector using Streamline. They stopped making Streamline years ago and supposedly integrated it into Photoshop. I tried it a few times and really didn’t like the results.

    Now that I’m working all digital I really hope this will do the trick. Thanks for the heads-up.

    • Krishna
      May 1, 2011 at 9:38 pm

      Happy to help, Tovias! I remember Adobe Streamline – it was eventually rolled into Illustrator (i.e. Live Trace).

  • Dave Anderson
    January 26, 2012 at 2:10 pm

    I’ve been using this for years. It seems strange that Adobe couldn’t figure out how to do this well. Great solution to a simple problem!

  • LinziClary
    April 8, 2012 at 7:40 pm

    I just downloaded Cocoapotrace and I’ve been having a hard time with it, I keep getting this error message that says to check my option values but I’m not sure what that means.
    Any help would be greatly appreciated!

    • Krishna
      April 8, 2012 at 7:42 pm

      Odd. Are you using the default values that Cocoapotrace comes with?

  • LinziClary
    April 8, 2012 at 7:45 pm

    I’m not sure, I clicked restore defaults before trying it, how do I find the default values that come with it?

    • Krishna
      April 8, 2012 at 7:47 pm

      The default settings should be there when you first load the app. You could try deleting the preference file associated with Cocoapotrace to see if that clears the error.

  • LinziClary
    April 8, 2012 at 8:01 pm

    ok I deleted it and its still not working, I think it might have to do with my version of Macintosh (I had to download the old version of cocopoatrace) but thanks for your help! your website was very helpful

  • Krishna
    April 8, 2012 at 8:03 pm

    Bummer. Hope you can find a way to make it work for you! Good luck!