I wouldn't worry about finding the "best" approach. Just think about an approach.

For example:


Suppose you have a two-dimension array of ints named pixelArray.

Declare an int named...