Bitmap File Formats and Colour Resolution

Topic status automatically displays here - do not remove.

Add me to your favorites!Bookmark this topic  Print me!Print this topic

A bitmap is an graphic file format which contains detailed information for each individual pixel of the graphic. It consists of a palette of predefined colours and a listing which links each pixel with one of the palette colours.

The more colours required for a graphic, the larger the palette, and the larger the pixel list link range required to handle the larger palette. This directly affects the bitmap file size, as the pixel list is multiplied by every pixel in the graphic.

Bitmap file size is also determined by the physical size of the graphic. The bigger the graphic, the more pixels it must store data for. In combination, a large (screensize) bitmap graphic consisting of a large range of colours (16 million) produces a large bitmap file size (MB).

A colour pixel is displayed in a combination of three colours Red, Green, and Blue (RGB). For a pixel to display a particular colour, the intensity of each RGB element of the pixel must be known. For example, pure red is defined by red = 100%, green = 0%, and blue = 0%. Pure black has red, green, and blue values of 0%, and pure white has red, green, and blue values of 100%.

One bit can store one of two possible states. 0 or 1. On or Off. 2x1=2. Two to the power of one (21).
Two bits can store one of four possible combinations 0-0, 0-1, 1-0, or 1-1. 2x2=4. Two to the power of two (22).
Four bits can store sixteen possible combinations. 2x2x2x2=16. Two to the power of four (24).
Likewise, eight bits can store 256 possible combinations  (28).

Bitmaps store a palette of pre-defined colours, and assign each pixel in the graphic to one of those colours in the palette. The palette is an overhead to the bitmap file size, and stores the RGB values for each of the colours available in the bitmap. A 256 colour bitmap needs to store the palette of 256 predefined individual colour settings, and a value of 0-256 for each pixel in the graphic to link to one of the colours of the palette. As the value of 256 requires the use of 8 bits to store, bitmaps with a palette of 256 colours are referred to as 8-bit bitmaps.

Incidentally, each colour of the palette must store the individual RGB values to define that colour. So a 256 colour bitmap will contain a palette which stores 3 values (one each for Red, Green and Blue) of 256 possibilities at 8 bits (1byte) each x 256 colours (3x256=768 bytes palette overhead).

Back to Top

See Also

Jump to site home page Lotech Solutions' Tips, Tricks, and Procedures | How to insert graphics into RTFs | Image effects in HTML pages |

Back to Top