save-canvas-to-image

0.1.1 • Public • Published

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

View the demo page

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

Readme

Keywords

Package Sidebar

Install

npm i save-canvas-to-image

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

4.08 kB

Total Files

5

Last publish

Collaborators

  • bytefunc