You can use the getPixels() method of the BitmapData class to get the raw
pixel data as a ByteArray. Using setPixels() you can fill a BitmapData
object with data from a ByteArray.

You can post / retrieve that data from a server using a URLRequest object,
specifying that you want to use a binary format. The problem of this
approach, I think, is that it'd consume a lot of bandwith (unless you have
really small images). Each pixel takes 4 bytes. In a 400 x 400 image, that's
160000 pixels and so 640000 bytes or 625 Kb.

Cheers
Juan Pablo Califano


2008/8/14, Omar Fouad <[EMAIL PROTECTED]>:
>
> Hello all,
> I was wondering if I can get the binary data from a bitmap data, and send
> it
> to database (blob) or/and getting the binary data from the database and in
> flash reform it to display the bitmap back.
>
> I've been reading about the ByteArray Class but I am still confused whether
> to use it or to use URLStreaming.
>
>
> Thanks.
>
> --
> Omar M. Fouad - Digital Emotions
> http://www.omarfouad.net
>
> This e-mail and any attachment is for authorised use by the intended
> recipient(s) only. It may contain proprietary material, confidential
> information and/or be subject to legal privilege. It should not be copied,
> disclosed to, retained or used by, any other party. If you are not an
> intended recipient then please promptly delete this e-mail and any
> attachment and all copies and inform the sender. Thank you.
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to