Image File Format

Width: 1 byte
Height: 1 byte
Bits per Pixel: 1 byte
n bits of pixel data

n = Width * Height * Bits per Pixel

Here is a bigger image at 9 bits per pixel. With 9 bits per pixel you can express 512 different colors. Click through to see the next image which is even more sophisticated, but easier to understand.