Converts SVGs to PNGs
Install the module with:
npm install svg-to-png
var svg_to_png = ;svg_to_png // async, returns promise;
The Input can be one of: A
String that is the file being converted, a
String that is a directory of files to be converted, or an
files to convert.
Note: The files passed in MUST ALL be SVGs. If you want to pass in a
directory that is not all SVGs, use
fs.readdir, filter the results,
and pass those in. An error will be thrown otherwise.
true, will compress your png file using optipng
3, if compress is set to
true, this will set the optimationLevel for optipng
Check out the tests!
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
Copyright (c) 2013 Jeffrey Lembeck/Filament Group
Licensed under the MIT license.