Skip to content
user friendly image saving from canvas tags
JavaScript PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README
canvassaver.js
example.html
saveme.php

README

A little helper object to allow for saving of a canvas tag to an image. It uses a server side script to save the image to avoid things like not being able to set a filename, and popping up scary looking dialogue boxes. For more in-depth explanation and example, see: http://greenethumb.com/article/1429/user-friendly-image-saving-from-the-canvas/

quick impl example:

<canvas id='drawhere' width='610' height='350'></canvas>
<script src="./canvassaver.js">
<script>
var cnvs = document.getElementById('drawhere');
var cs = new CanvasSaver('./saveme.php')
var btn = cs.generateButton('save an image!', cnvs, 'myimage');
document.appendChild(btn);
</script>
You can’t perform that action at this time.