Bitmap data

The bitmap data is an Array that maps four numbers to each pixel in the image: r, g, b, a, where r, g, b are integer values from 0 to 255 which describe red, green, and blue respectively; and a, which is an 'alpha' value between 0 and 255 in which 0 is transparent and 255 is completely opaque.

Since there are four array elements for each pixel, the total array will contain 4 times as many elements as there are pixels in the image.

The first pixel's red data is at data[0], the second pixel's red data at data[4], etc. 

Here's a diagram that may help. This is a nine-pixel approximation of the French flag, as a bitmap. There are nine pixels, each with four array elements to describe their appearance, for 36 data elements in all. So, for example, to change the color of the top-right pixel to blue, you'd change imgArr[8] to zero and imgArr[10] to 255.  

french-flag-bitmap