Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
noahnu
Posts: 138
Registered: ‎01-09-2011
My Device: Blackberry Tablet OS
Accepted Solution

BitmapData from byte[]

How do I convert a byte[] to BitmapData?

From,
Noah NU
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: BitmapData from byte[]

I'm new enough to ActionScript that I don't recognize that syntax.  What's a "byte[]"?

 

Did you mean a flash.utils.ByteArray ?


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: BitmapData from byte[]

If you do have a ByteArray, you would apparently be able to use a Loader object, call loadBytes() on it, and extract the bitmap data from it as shown in this answer.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
noahnu
Posts: 138
Registered: ‎01-09-2011
My Device: Blackberry Tablet OS

Re: BitmapData from byte[]

[ Edited ]

Oh my mistake. I guess I got my Java and my AS3 confused.

 

Yes I mean a ByteArray.

 

EDIT: That also explains why when I searched my question on the forum before posting I got no results.

From,
Noah NU
Please use plain text.