Home

Awesome

:warning: This project is archived and the repository is no longer maintained.

svg-to-png Build Status

Filament Group

Converts SVGs to PNGs

Getting Started

Install the module with: npm install svg-to-png

var svg_to_png = require('svg-to-png');

svg_to_png.convert("input", "output") // async, returns promise
.then( function(){
	// Do tons of stuff
});

Documentation

.convert

Required Params

Input

Type: String or Array

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 Array of 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.

Output

Type: String

Output folder

Optional Params

Options

Type: Object

Examples

Check out the tests!

Contributing

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.

Roadmap

This repository is now using lodash style issue management for enhancements. This means enhancement issues will now be closed instead of leaving them open.

The enhancement backlog can be found here: https://github.com/filamentgroup/svg-to-png/issues?utf8=%E2%9C%93&q=label%3Aneeds-votes+sort%3Areactions-%2B1-desc+

Don’t forget to upvote the top comment of each issue with 👍!

Release History

License

Copyright (c) 2013 Jeffrey Lembeck/Filament Group
Licensed under the MIT license.