2.1.0 • Published 4 years ago
@magic-words/canvas2image v2.1.0
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
- Save canvas as image
- Convert canvas to image
- 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