I’m storing ByteArray pixel data via BitmapData.getPixels(). The visual representation is rectangle that contains a vertical gradient. Later, I’m using BitmapData.setPixels(); to draw the stored ByteArray to another BitmapData instance. What I’m looking to do, is to reverse the gradient when it’s redrawn via setPixels() so that it’s basically a flip of the same same gradient. In theory, is there away to ‘reverse’ ByteArray to allow me to do that? I’m not yet too familiar with the guts of ByteArray. I know of other ways to handle this by using the draw method along with a Matrix, but with what I’m trying to attempt, the draw method is going to probably be too slow within my iterations compared to setPixels.
Any advice is appreciated, thanks!