You are welcome. One suggestion for even faster setPixel(), setPixel32(), getPixel(), getPixel32(), if the image width/height not changing so often, but the performance is essential.
var pos = (y * this.width + x) << 2; where this multiplication is the "slowest" part. So, in the
PixelsData class declare:
private var y_mul_width:Array<Int> = ;
then fill it in the constructor:
for (i in 1 ... height) y_mul_width[i] = y_mul_width[i - 1] + width;
And now, you just need to change every
y * this.width to
In flash, it is faster, but in HTML5 target I didn't tested yet.
And I try to port from flash into Pixels a MLAA (Morphological Antialiasing) function, but it need 3x more memory like only the image.