A simple interface for converting raster images into vector graphics using AutoTrace.
More details about AutoTrace can be found here.
$ npm install -g autotrace
Typical output formats include EPS, AI, SVG, DXF, PDF, MIF and Cairo. All supported output formats can be found by running;
Convert a PNG to SVG.
// input file, options and a callback;// options and a callback;// chaining;
// stream output to a WriteableStream;// without a callback, .stream() returns a stream// this is just a convenience wrapper for above.var writeStream = fs;;
autotrace(inputFile, options, callback)
The first argument can be either a file path or an options object. The only required option is inputFile (when not passing as the first argument); all others are optional. Refer to the above usage section for examples.
Options/Methods - all of AutoTrace's are supported along with some custom ones.
# Refer to AutoTrace's help for details. man autotrace
If a callback (e.g. autotrace(file, callback)) is provided the exec method is automatically called for you.