Flash Player 10 to the rescue

The other week I was looking into exporting images in AS3 for a really nice “make-your-own-???” type of website project here at LOVE and came across various references to Adobe’s Core Libraries, which as it turns out should cover this off nicely by creating JPEGs and PNGs simply and easily by parsing BitmapData into a ByteArray and tossing it over to PHP. I say “should” because this is Adobe, so of course it didn’t work and I ended up having to piece together (very helpful) bits and bobs from various sources until eventually something somewhere clicked into place.

Parallel to this, I’ve had an idea slowly gestating for a while now which has just recently grown some milk teeth and started gnawing at the inside of my head to get itself born. The plan is to expand on the bit of generative art I dipped my little toe into way back in February by creating an expandable base system which can handle paper sizes for high-res prints and so on and accept plugins to create the actual artwork. Maybe using AIR, we shall see. Should be interesting, only a quick look in photoshop confirms that even a 300dpi A4 image (210 x 297mm) rocks in at a not inconsiderable 2480×3508 pixels. So that’s well over BitmapData’s silly, petty 2880×2880 pixel limitation then. Hmmm.

Now I’d heard Jared Tarbel briefly mention his own GiantCanvas class back at FOTB in November in his mesmerising “the Circle” talk and I was all set to get down to it when up popped the mighty Keith Peters with his BigAssCanvasMuch cooler name, it has to be said, plus Keith’s solution mimics BitmapData pretty damn closely, so maybe we had a winner.

But digging only marginally deeper, it turns out that both these problems may just have been solved very recently in one fell swoop, thanks to the shiny new Flash Player 10 beta. As Matthew Fabb at FITC enlightens:

“…now developers won’t have to send bitmap data to the server to be processed and then sent back to be saved. In Flash Player 10, bitmap data can be saved locally… [and] in Flash Player 10, they will be removing the 2880 pixel limitation!”

Fantastic! Time to get this baby built then! It’s certainly good to see Adobe on top of some sensible, thought-out changes as we all move inexorably onwards and upwards after all that horrible time ActionScript spent in the structural and syntactic wilderness. Now I’m just looking forward to CS4 so I can spend some quality time with Hydra, the nice new Drawing API, 2.5D, IK….

3 Responses to “Flash Player 10 to the rescue”

-->

Comments:


  1. Alright mate, my Binary Flower major project uses Adobe’s JPEGEncoder class to take a snapshot of the user’s garden each time they log in then uploads it onto the server to be displayed in the gallery on the front page. Posh stuff! Check it out – http://www.binaryflower.org. Also, check out the site I just finished for our degree show which features some Papervision loveliness – http://www.nmhorizons.co.uk

    Hope everything’s spiffy in Manch. I’ll be seeing you soon I’m sure of it.

  2. Yeah mate, JPEGEncoder’s part of Adobe’s CoreLibs I mentioned above – along with (funnily enough) PNGEncoder. Pretty good, but fiddly to get going. It’ll be much nicer to just export BitmapData directly and save locally in FP10.

  3. [...] the beta release notes. So Flash 10’s BitmapData’s not quite the saviour of all mankind I thought it was. Even A3 @ 300dpi comes to at 3508×4961 = 17,403,188 pixels, and I want my PrintCanvas to [...]

Say your piece...