Part of my app includes html5 photo editing using a mixture of standard 2d context canvases and webGL.
Anyway, I am saving \'undo\' states while the user is manipula
I just went through this the other day... the getImageData method returns an image object where the actual data is stored in a uint8array... you have to get the data converted to something your database can manage and its just not worth it, the final output is much larger than the toDataURL method
Its also very simple to get toDataURL base64 string back onto the canvas... you just instantiate a new image and give the src the base64 string