Check this out:
http://backspaces.net/temp/export.html
.. it runs for 200 ticks then creates dataUrl images out the individual
layers being used (Patches, Links, Turtles). And then creates a composite
of all the layers (export world sort of thing)
One fascinating thing: if you click on the layers & composite, and save-as,
the resulting images are real pngs! Like tiny!
So the browser has the ability to create pngs and download them. This is
maybe useful. Surprisingly, the dataUrls are not that much larger.
Example: on the run I just made, the composite dataUrl was 55K, while the
saved .png was 42K. Possibly the png is not as compressed as it could be ..
when I read it into Graphic Converter and wrote it back out, it shrank to
36K. But still, the dataUrl is not that bad.
There's a hack that I've seen on Stack Overflow where you put the image in
a hidden <a> then use JS to "click" it and it downloads it! Weird.
I've also use canvas.toBlob, and createImageBitmap(blob). They're pretty
compressed, say 1/3 smaller. But only on modern browsers etc...
-- Owen
============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com