juliandescottes/piskel — pull request #94 by juliandescottes (2012-09-19 22:53:54+00:00)
Title: Add export2png

Basic export feature :

* New button in top left section (next to save button)
* Icon coming from Fugue set : http://p.yusukekamiyamane.com/icons/search/fugue/icons-24/image-export.png
* Added a new renderer : Spritesheet renderer. Could mutualize more with existing FrameRenderer.
* SpritesheetRenderer concatenates all the frames in a single canvas, then calls toDataUrl("image/png") to get a base64 URL representing the framesheet. (need to check size limitations on this, otherwise will be pretty limited). Then opens a window targetting this base64URL so that user can save image.

Improvements in the pipe :
* display exported image in a modal dialog/placeholder in the application
* download the image directly

About "download the image directly" : this was my initial goal, but I had __many__ issues trying to accomplish this, the best I could do was to copy what is done by http://www.nihilogic.dk/labs/canvas2image/ which is crappy (try it if you want to understand why).

I also played a bit with html5 blobs but didn't manage to use it for my needs. Bottom line is I'm not sure we'll be able to have a fully client side save feature. Not that I want it to be done on the client side at all costs ... just basic lazyness to modify the appspot here.