Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hongru/canvas2image
a tool for saving or converting canvas as img
https://github.com/hongru/canvas2image
Last synced: 2 months ago
JSON representation
a tool for saving or converting canvas as img
- Host: GitHub
- URL: https://github.com/hongru/canvas2image
- Owner: hongru
- Created: 2012-02-02T01:48:39.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2021-03-12T13:08:48.000Z (almost 4 years ago)
- Last Synced: 2024-09-27T13:16:04.469Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 14.6 KB
- Stars: 1,299
- Watchers: 34
- Forks: 913
- Open Issues: 38
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- awesome-canvas - canvas2image - a tool for saving or converting canvas as img. ![](https://img.shields.io/github/stars/hongru/canvas2image?style=social) ![](https://img.shields.io/github/forks/hongru/canvas2image?style=social) (Libraries / Poster and Screenshot)
README
# Canvas2image #
a tool of saving or converting canvas to images## Demo ##
[canvas2image](http://hongru.github.com/proj/canvas2image/index.html)## Code ##
you can just use it like thisCanvas2Image.saveAsImage(canvasObj, width, height, type)
Canvas2Image.saveAsPNG(canvasObj, width, height)
Canvas2Image.saveAsJPEG(canvasObj, width, height)
Canvas2Image.saveAsGIF(canvasObj, width, height)
Canvas2Image.saveAsBMP(canvasObj, width, height)
Canvas2Image.convertToImage(canvasObj, width, height, type)
Canvas2Image.convertToPNG(canvasObj, width, height)
Canvas2Image.convertToJPEG(canvasObj, width, height)
Canvas2Image.convertToGIF(canvasObj, width, height)
Canvas2Image.convertToBMP(canvasObj, width, height)
## License
MIT