1.0.12 • Published 4 years ago

@anzerr/svg.to.img v1.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Intro

GitHub Actions status | publish

convert svg to png or jpg using canvas

Install

npm install --save git+https://github.com/anzerr/svg.to.img.git
npm install --save @anzerr/svg.to.img

Example

const convert = require('svg.to.img'),
	fs = require('fs.promisify');

convert('./test/1.svg', {width: 100, height: 100}).then((res) => {
	return fs.writeFile('1.png', res);
});