Kasper
Kasper

Reputation: 1292

FLASH save frame, to image (tiff, bmp, jpg, gif, png)

The title sort of explains itself. I am making some 'genrative' artwork in flash. Now I want to save the frame without making a screenshot so-on and sofort. And perhaps one day i would like to save a batch of frames.

Is there an AS3 class/library out there that could help me out ?

Upvotes: 3

Views: 16880

Answers (2)

davr
davr

Reputation: 19137

Actually, using the just released Flash 10, you CAN save to the HD! It's very handy, for just this situation. It's perfectly secure, because it only lets you save a file after the user clicks 'Save' in the file dialog, you can't just go writing files willy-nilly. Also, there is code out there already written that allows you to take snapshots using BitmapData, and compress to PNG or JPEG. I'd recommend PNG because it's lossless, which is nice for artwork you're creating.

Here's a few relevant links:

Upvotes: 11

HanClinto
HanClinto

Reputation: 9461

Do you want to save the file to a hard-drive or to a website?

If to a hard-drive, you might have a hard time unless you're open to using Air. Because of the security sandbox of Flash, you can't write arbitrary files to the user's hard disk.

If you absolutely must save it to a user's hard-drive using Flash and not Air, you'll probably have to send the bitmap data to a server-side PHP (or similar) script which will then allow the user to download and save the image in one location or another.

Upvotes: 0

Related Questions