2

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?

user306492
  • 21
  • 1

1 Answers1

1

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.

grapefrukt
  • 27,016
  • 6
  • 49
  • 73
  • I'm already doing that and it works pretty good with fillrect. I'm wondering if there is an alternative that is faster. – user306492 Apr 02 '10 at 06:13
  • Looks like I'm going to go with something similar to base64 like I originally thought. Thanks for the help anyways. – user306492 Apr 03 '10 at 12:06