How to convert bytearray to image or image to bytearray


How to assign bytearray value to panel background image. If anybody have idea or experiance plz help me to overcome the problem. BRIEF EXP:

I have panel control and want to load image getting from webservice as a backgroundimage. So i used setstyle() but its not accepting that image. so how to add that image into my panel background image.Plz tel me your ideas here.

Best Solution

In Flex 3 or higher, you just need to do:

 yourImage.source = yourByteArray;