About Me

My photo
Drum & Bass Producer, Software Developer, Love my Cats

HTML5: How to save a canvas to PNG, JPG or BMP

I want to save the contents of a canvas element to a file.
I came across this wonderful library for saving html5 canvas elements to image file

You import 2 JS libraries, get the canvas from the DOM, and call this function:
Canvas2Image.saveAsPNG(canvas); 
The user will get a save dialog.