More about Bitmaps Page 1
If you are going to use bitmaps, you need to know a bit about how they are defined and stored.
to Learn Your RGB - Painting by Numbers
Three values are used to represent the appearance of the pixel:
first value is always R
(red), the second is
G (green) and the third
is B for blue. These can
only be whole numbers. No decimals or fractions allowed.
that we have a pixel with an RGB value of 0,0,0; that would mean
that its red value is 0 (zero) and so too are the pixel's green
and blue values.
If we want the pixel to be 100% white, again the three numbers of the the RGB values will be the same, usually, 255,255,255. This will be both pure white and also the brightest possible value.
if the darkest colour possible, black, is 0,0,0 and the brightest
colour possible is white which is 255,255,255 then it is easy to
I said that the value of white would usually be 255,255,255. In fact, this value may actually be more or less, depending on the colour depth being used. When the maximum value is 255 in each colour, the colour depth is known as 24 bits per pixel. (A bit is a computer term and is related to powers of the number 2).
We will now take a look at a 24 bit image.
Let us suppose that we want to show an image of a pure blue sphere that is lit from above.
For the sake of this example, we will also assume that there is no ambient light in the scene - this means that the bottom part of the sphere will lie totally in shadow, so the colour there will be 0,0,0 and the top part will be pure blue, that is 0,0,255.
The point to note is that in the image above, there are no colours
being used except for blue. Since that is going from 0 to 255, there
are just 256 shades of blue in the image. 256 has been found to
be a reasonable number to trick the eye into thinking that the sphere
is smoothly shaded and for the jump between each shade to be practically
When you see separate colours instead of smooth
shading, the effect is known as banding.