user306492
user306492

Reputation: 21

Creating Bitmaps from ARGB strings (in actionscript-3)?

in actionscript 3, what's the fastest way to dump your data (not from a file) into a bitmap for display?

I have it working with setPixels and colored rects but that's way too slow/inefficient.

Is there a way to load in the raw bytes or hijack the loader class to put in custom loader data?

What would be the best/fastest--should I start writing a byte encoder?

Upvotes: 2

Views: 330

Answers (1)

grapefrukt
grapefrukt

Reputation: 27045

You can quickly copy data from a ByteArray into a Bitmap using setPixels(). Even if you need to do some wrangling of your data beforehand, it should be way faster than setting each pixel individually.

Upvotes: 1

Related Questions