Excuse me, but what is the advantage to doing it this way? I'm trying to picture it and I don't understand why it would be superior to any other kind of sorting loop... The bitmap just seems like an awful lot of overhead for something that could be done just as well with a 2-dimensional array and some bitmath, isn't it? Given that you know the width and height of the array and all its vectors have a fixed length, wouldn't it be faster to implement some kind of x/y iterators to perform an operation on a straight array within the chosen rectangle and avoid the bitmapdata overhead altogether?

Must be missing something...