SVG-to-PNG Converter Using PhantomJS
Forked from svg2png
You have a SVG file. For whatever reason, you need a PNG. svg2png can help.
var svgTool = ;;
Maybe you need to scale the image while converting? We can do that too:
The scale factor is relative to the SVG's
height attributes, for the record.
Do you want to render many SVGs in one go? Totally possible!
// Render to two specific targets;// Render to a directory;
svg-tool is built on the latest in PhantomJS technology to render your SVGs using a headless WebKit instance. I have
found this to produce much more accurate renderings than other solutions like GraphicsMagick or Inkscape. Plus, it's
easy to install cross-platform due to the excellent phantomjs npm package—you don't even need to have
PhantomJS in your