@anzerr/svg.to.img
TypeScript icon, indicating that this package has built-in type declarations

1.0.12 • Public • Published

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);
});

Package Sidebar

Install

npm i @anzerr/svg.to.img

Weekly Downloads

9

Version

1.0.12

License

MIT

Unpacked Size

6.99 kB

Total Files

6

Last publish

Collaborators

  • anzerr