BitmapData pixel format

The documentation for BitmapData specifically says that the data is in ARGB format. Indeed, if I do:

var bitmapData = new BitmapData (100, 100, true, 0xFF112233);
var pixels = bitmapData.getPixels (bitmapData.rect);
pixels.position = 0;
var pixel = pixels.readUnsignedInt();

Then pixel returns 0xFF112233.

However, if I run this same test with -Dnext, pixel contain 0x112233FF. ImageDataUtils.fillRect() specifically converts from ARGB to RGBA.

Is this on purpose? Do we intend to use different pixel formats in legacy and next?

Yes, this is on purpose.
I was also confused but finally I figured out why they have changed pixel order.

In the latest version of lime(2.0.4 or later) pixels are automatically converted to ARGB from RGBA. It used to be RGBA even on next version, but they changed it from 2.0.4 to make the behavior of getPixel* functions consistent.
(getPixel32 returns pixels as ARGB on all versions, even though getPixels of older lime returns pixels as RGBA)

Internally images are stored in RGBA. Currently there is no method to obtain images without using untyped, since they are private member of BitmapData.

Ah hah! Yep! I thought I had the latest, but I didn’t. After getting this, now things work in -next like I expect.

Thank you!