@magic-words/canvas2image
v2.1.0
Published
Implementation of canvas2image in Typescript.
Downloads
5
Maintainers
Readme
canvas2image
Implementation of canvas2image in Typescript. It was originally created by hongru. It is a tool to save or convert a canvas to an image. This version will have / has some new features added, such as the ability to copy a canvas to the clipboard.
Features
- [x] Save canvas as image
- [x] Convert canvas to image
- [x] Copy canvas to clipboard
- [ ] Bitmap support
Installation
npm i @magic-words/canvas2image
Usage
Downloading an image from a canvas to your machine:
import { CanvasToImage } from '@magic-words/canvas2image';
CanvasToImage.saveAsImage(this.canvas, 'png', 'image.png');
API Documentation: https://magic-words.github.io/canvas2image/modules/index.canvastoimage.html
References
https://github.com/hongru/canvas2image
License
MIT