AQA GCSE Computer Science (8525), section 3.3.6 (Representing images)
Pixels
A pixel (short for picture element) is a single point of an image. A screen displays an image as a grid of tiny coloured dots.
Bitmaps
A bitmap image is made of a grid of pixels. Each pixel is stored as a binary number that says what colour it is.
Image size
The size of a bitmap is the number of pixels, written width × height. For example, an image 800 × 600 is 800 pixels wide and 600 pixels high, so it has pixels.
Colour depth
Colour depth is the number of bits used for each pixel.
| Colour depth | Number of colours |
|---|---|
| 1 bit | 2 (black and white) |
| 2 bits | 4 |
| 8 bits | 256 |
| 24 bits | over 16 million |
With bits there are possible colours.
A tiny example
A 1-bit image uses 0 for white and 1 for black:
This 4 × 4 bitmap shows a ring: the bits are the pixels, row by row.
Effects on quality and file size
| Change | Effect on the image | Effect on file size |
|---|---|---|
| More pixels | more detail and sharper | bigger file |
| Higher colour depth | more colours, more realistic | bigger file |
| Fewer pixels or lower colour depth | blocky or fewer colours | smaller file |
Example: a photo of 2000 × 1500 pixels with 24-bit colour has a much larger file than a 100 × 100 image with 1-bit colour, but looks far better.
Metadata
Image files also store extra information, such as the width, height and colour depth, so the file can be displayed properly.
Common mistake: saying a bigger image "has more bits per pixel". Image size (number of pixels) and colour depth (bits per pixel) are different things, and both affect the file size. Also, a pixel is one point, not the whole image.
Exam tip: when asked how image size or colour depth affects an image, give both the quality effect and the file-size effect, with a short example.
Check yourself
What does the word pixel stand for?
Picture element.
How many colours can a 3-bit colour depth represent?
colours.
What happens to the file size if the colour depth is increased?
It gets larger, because more bits are stored for every pixel.