canvas2image-es6
v1.2.0
Published
基于canvas2image自己改的,原组件不能修改文件名,不能export,我改了给自己项目用的,麻烦不要瞎下载
Downloads
42
Readme
Canvas to Image npm Module
A reimplementation of the Canvas2Image client side javascript library for npm.
https://github.com/hongru/canvas2image
Code
Canvas2Image.saveAsImage(canvasObj, width, height, type, fileName)
Canvas2Image.saveAsPNG(canvasObj, width, height, fileName)
Canvas2Image.saveAsJPEG(canvasObj, width, height, fileName)
Canvas2Image.saveAsGIF(canvasObj, width, height, fileName)
Canvas2Image.saveAsBMP(canvasObj, width, height, fileName)
Canvas2Image.convertToImage(canvasObj, width, height, type)
Canvas2Image.convertToPNG(canvasObj, width, height)
Canvas2Image.convertToJPEG(canvasObj, width, height)
Canvas2Image.convertToGIF(canvasObj, width, height)
Canvas2Image.convertToBMP(canvasObj, width, height)
License
MIT