@magic-words/canvas2image

2.1.0 • Public • Published

canvas2image

npm language license: GPL v3 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

Package Sidebar

Install

npm i @magic-words/canvas2image

Weekly Downloads

1

Version

2.1.0

License

MIT

Unpacked Size

454 kB

Total Files

28

Last publish

Collaborators

  • dhorvay