0.0.3 • Published 4 years ago

canvas-to-png v0.0.3

Weekly downloads
13
License
GPL-3.0
Repository
github
Last release
4 years ago

canvas2image

Canvas2Image cannot be imported as a module and seems to no longer be maintained.

This repository contains the original code, a few changes for fileName and a export statement.

Usage

npm install canvas-to-png
import Canvas2image from "canvas-to-png";

Canvas2image.convertToPNG(canvas, 400, 400);
Canvas2Image.saveAsImage(canvasObj, width, height, type,fileName)
Canvas2Image.saveAsPNG(canvasObj, width, height)
Canvas2Image.saveAsJPEG(canvasObj, width, height)
Canvas2Image.saveAsGIF(canvasObj, width, height)
Canvas2Image.saveAsBMP(canvasObj, width, height)