save-canvas-to-image
v0.1.1
Published
Convert canvas to image and the browser start downloading to image
Downloads
10
Readme
save-canvas-to-image
Convert canvas to image and the browser start downloading to image
Installation
npm install --save save-canvas-to-image
or
yarn add save-canvas-to-image
Demo
Usage
import saveCanvas from "save-canvas-to-image";
saveCanvas.saveImage("canvas_id", "file_name", "format");
saveCanvas.saveJPEG("canvas_id", "file_name");
saveCanvas.savePNG("canvas_id", "file_name");
saveCanvas.saveWEBP("canvas_id", "file_name"); // chrome and firefox only?
License
MIT