- Bitmap images: pixels, resolution, colour depth
A bitmap is a grid of pixels; each pixel stores a binary colour code.
A bitmap image is stored as a rectangular grid of tiny squares called pixels (picture elements). Each pixel stores a binary code for its colour.
Two key properties:
- Image resolution — the number of pixels in the image, written as width × height (e.g. 1920 × 1080). More pixels → more detail.
- Colour depth (bit depth) — the number of bits used per pixel. A colour depth of d bits gives 2^d possible colours (e.g. 8 bits → 256 colours; 24 bits → ~16.7 million).
Don't confuse image resolution (pixels in the image) with screen resolution (the pixels a display can physically show). A file header at the start of the file records the dimensions, colour depth and format.
- Pixel = smallest element; stores a binary colour code.
- Image resolution = width × height (pixels).
- Colour depth = bits per pixel → 2^d colours.
- Screen resolution ≠ image resolution.
- File header stores dimensions, depth and type.