ScratchCanvas
From Emitrom
The ScratchCanvas class can be used to snapshot a canvas and translate it to a portable format. It provides two utility methods to ease in the process of converting an existing canvas into a base64 string.
- toDataURL() - Will use a PNG format as the default.
- toDataURL(Sring mimeType) - Allows you to specify a valid mime type.