Reputation: 21
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
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