You may speed up things massively when you first read all pixels to an array, then process the array instead of the buffer and finally write the array back to the buffer.
The reason why is the machine will be able to cache things this way.
Tho in a 64*64 Buffer it doesn't matter that much.
The reason why is the machine will be able to cache things this way.
Tho in a 64*64 Buffer it doesn't matter that much.