potrace 

potrace is a bitmap (raster) to vector conversion utility that supports and outputs (among others) and also includes a nice quantizing utility called mkbitmap.