Yes, that would be nice!
For what I've been doing a synchronous
"convertToBitmapData(bytes:ByteArray):BitmapData"  would be really nice
as well.
If only because using a "loader" seems a bit "wrong" when you've already
loaded (or otherwise have) a byteArray.
I have to admit that I've not actually checked the source code to see if
I could find/copy that kind of function, however, since I do now have
everything working with loader.
Thanks Alex!
Jim.
 
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: 02 November 2007 16:05
To: [email protected]
Subject: RE: [flexcoders] Convert ByteArray to Bitmap
 
Yeah, things are "working", but really there should be a loadBytes() API
on mx:Image/SWFLoader to save you a step.
 
________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Jim Hayes
Sent: Friday, November 02, 2007 3:16 AM
To: [email protected]
Subject: RE: [flexcoders] Convert ByteArray to Bitmap
 
Oops, sorry, this one makes slightly more sense (first thing in the
morning, not even finished my first cuppa...)

private var _ldr:Loader

private function myTest():void{
//get ByteArray from Image Component content
var testBM:Bitmap = testImg.content as Bitmap;
var myByte:ByteArray = new JPEGEncoder().encode(testBM.bitmapData); 
_ldr = new Loader();
_ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,bitmapLoaded);
_ldr.loadBytes(myByte);
}

private function bitmapLoaded(event:Event)
{
_ldr.removeEventListener(Event.COMPLETE,bitmapLoaded)
//reset source
myImage.source = _ldr.content;
}



.
 
<http://geo.yahoo.com/serv?s=97359714/grpId=12286167/grpspId=1705007207/
msgId=92581/stime=1193998266/nc1=4507179/nc2=3848642/nc3=5008826> 




______________________________________________________________________
This communication is from Primal Pictures Ltd., a company registered in
England and Wales with registration No. 02622298 and registered office:
4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W
5PA, UK. VAT registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read,
copied and used only by the intended recipient. If you have received it
in error, please contact the sender immediately by return e-mail or by
telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not
disclose its contents to any person.
This email has been scanned for Primal Pictures by the MessageLabs Email
Security System.
______________________________________________________________________



 

______________________________________________________________________
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
______________________________________________________________________

Reply via email to