svg.to.img:使用画布将svg转换为png或jpg

时间:2021-05-05 22:02:53
【文件属性】:
文件名称:svg.to.img:使用画布将svg转换为png或jpg
文件大小:63KB
文件格式:ZIP
更新时间:2021-05-05 22:02:53
nodejs svg image png canvas Intro 使用画布将svg转换为png或jpg 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 ) ; } ) ;
【文件预览】:
svg.to.img-master
----index.js(388B)
----package.json(919B)
----.github()
--------workflows()
----test()
--------3.svg(94KB)
--------1.svg(458B)
--------2.svg(18KB)
----LICENSE(1KB)
----package-lock.json(55KB)
----example.js(198B)
----src()
--------util.js(1KB)
--------scale.js(3KB)
----.npmignore(81B)
----.gitignore(40B)
----README.md(496B)

网友评论