"... Converts the canvas to a binary image ..."
Just realised that in fox3 right mouse click on the canvas allows you to save the image as a .png
You can also save an image via the toDataUrl method of a canvas object: http://www.whatwg.org/specs/web-apps/current-work/#todataurl
My project just got a lot more interesting. One of the things I was having trouble with is generating an image from data with severe constraints on modules & processing time. Processing.js fills the gap of PIL which I couldn't use. I'm finding more and more interesting JS modules. Take this one for instance ~ http://www.nihilogic.dk/labs/canvas2image/ Converts the canvas to a binary image.