bdwapp / aefewew.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Canvas2image

a tool of saving or converting canvas to images

Demo

canvas2image

Code

you can just use it like this

Canvas2Image.saveAsImage(canvasObj, width, height, type)
Canvas2Image.saveAsPNG(canvasObj, width, height)
Canvas2Image.saveAsJPEG(canvasObj, width, height)
Canvas2Image.saveAsGIF(canvasObj, width, height)
Canvas2Image.saveAsBMP(canvasObj, width, height)

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

About


Languages

Language:JavaScript 76.9%Language:HTML 23.1%