You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Computers represent images as grids of tiny coloured squares called pixels. This lesson covers how images are stored digitally, including the concepts of colour depth, resolution, metadata, and file size calculation. This is part of OCR J277 Section 2.6.
A pixel (picture element) is the smallest individual element of a digital image. Each pixel stores a single colour value as a binary number. When millions of pixels are displayed together, they form a recognisable image.
Colour depth (also called bit depth) is the number of bits used to represent the colour of each pixel. More bits means more possible colours:
| Colour depth | Number of colours | Use |
|---|---|---|
| 1 bit | 2^1 = 2 | Black and white |
| 2 bits | 2^2 = 4 | Simple graphics |
| 4 bits | 2^4 = 16 | Basic colour icons |
| 8 bits | 2^8 = 256 | GIF images |
| 16 bits | 2^16 = 65,536 | High colour |
| 24 bits | 2^24 = 16,777,216 | True colour (photos) |
24-bit colour is the standard for photographs. It uses 8 bits each for red, green, and blue (RGB):
This is why web colour codes like #FF0000 use hex pairs — each pair is one 8-bit channel.
OCR Exam Tip: The number of colours available is 2^(colour depth). If the colour depth is 8 bits, there are 2^8 = 256 colours. You must be able to calculate this in the exam.
Resolution is the number of pixels in an image, typically expressed as width x height (e.g., 1920 x 1080).
| Term | Meaning |
|---|---|
| Image resolution | Total number of pixels (width x height) |
| Screen resolution | Number of pixels a display can show |
| Print resolution | Pixels per inch (PPI) or dots per inch (DPI) |
Higher resolution means more pixels, which means:
flowchart LR
A[Real-world scene] --> B[Camera sensor]
B --> C[Grid of pixels - W x H]
C --> D[Each pixel: RGB colour value]
D --> E[Colour depth = bits per pixel]
E --> F[Pixel data + metadata]
F --> G[File size bits = W x H x colour depth]
G --> H[Optional compression - JPEG / PNG]
H --> I[Stored image file]
The formula for calculating the file size of an uncompressed image is:
File size (bits) = width (pixels) x height (pixels) x colour depth (bits)
To convert to bytes: divide by 8 To convert to kilobytes: divide by 1024 To convert to megabytes: divide by 1024 again
An image is 800 x 600 pixels with 24-bit colour depth. Calculate the file size.
| Step | Calculation | Result |
|---|---|---|
| Total pixels | 800 x 600 | 480,000 |
| Total bits | 480,000 x 24 | 11,520,000 bits |
| Total bytes | 11,520,000 / 8 | 1,440,000 bytes |
| Kilobytes | 1,440,000 / 1024 | 1,406.25 KB |
| Megabytes | 1,406.25 / 1024 | 1.37 MB |
OCR Exam Tip: Always show every step of your file size calculation clearly. Write the formula first, then substitute the values. This guarantees method marks even if you make an arithmetic error.
Metadata is data about data. Image files contain metadata that describes properties of the image, stored alongside the pixel data. Metadata is essential for correctly displaying the image.
| Metadata | Purpose |
|---|---|
| Width and height | Tells the software how to arrange the pixels |
| Colour depth | Tells the software how many bits represent each pixel |
| File format | Identifies how the data is encoded (e.g., BMP, PNG, JPEG) |
| Date/time | When the image was created |
| Camera settings | Aperture, shutter speed, ISO (for photos) |
| GPS location | Where the photo was taken |
| Change | Effect on quality | Effect on file size |
|---|---|---|
| Increase resolution | Higher quality (more detail) | Larger file |
| Decrease resolution | Lower quality (less detail) | Smaller file |
| Increase colour depth | More colours, smoother gradients | Larger file |
| Decrease colour depth | Fewer colours, banding/posterisation | Smaller file |
| Property | Low value | High value |
|---|---|---|
| Resolution | Blocky, pixelated image | Sharp, detailed image |
| Colour depth | Limited colours, flat appearance | Rich, realistic colours |
| File size | Small, quick to transfer | Large, slow to transfer |
An image is 1024 x 768 pixels with 8-bit colour depth. What is the file size in KB?
How many colours can be represented with a 4-bit colour depth?
A wildlife photographer exports the same photograph at two quality settings and wants to know how much storage each version requires.
Version A — web preview: 1280 x 720 pixels, 16-bit colour depth.
Version B — print master: 4032 x 3024 pixels, 24-bit colour depth.
Comparison.
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.