I guess you need some kind of specification, how the bytes for a
bitmapdata are created and stored.
I have no idea if you can find that.
Basically they're doing that in the JPGEncoder andPNGEncoder?
You might want to see what they're doing to get some details about what
is stored and where.
http://code.google.com/p/as3corelib/source/browse/trunk/src/com/adobe/images/JPGEncoder.as
http://code.google.com/p/as3corelib/source/browse/trunk/src/com/adobe/images/PNGEncoder.as
Romu
Jiri wrote:
Hello,
I have a BitmapData and use the draw() method to add sprite data. Then
I get the ByteArray through the BitmapData.getPixels() method. This
byteArray is compressed and cached.
Then when i need it, i decompress the ByteArray and use the
BitmapData.setPixels() and add all that to a new Bitmap()
Next I use the Bitmap.getPixel(MouseX , MouseY) to check if the pixel
is white or not. White meaning I cannot 'walk' there.
My question is, can I skip the adding of the ByteArray to the Bitmap
and directly access the value corresponding to the x and y in the
ByteArray.
This would probably save me some computation time.
How are the bytes stored, is it a multi dimensional array and if so,
what is the colum size?
Thank you,
Jiri
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders