J277 Revision

Image Representation

1. Bitmaps & Pixels

Pixel: Short for "Picture Element". It is the smallest unit or single point in an image.
Bitmap: An image constructed from a grid of pixels.

Binary Representation

Computers process data using switches (transistors) that only have two states: ON (1) or OFF (0).

Therefore, every pixel in a bitmap must be converted into a binary code.

Grid Mapping Example

Bit Stream:
0 1 0 1
1 1 1 1
0 0 0 0
1 0 1 0
0
1
0
1
1
1
1
1
0
0
0
0
1
0
1
0

*In a black and white image, 1 bit is needed per pixel (0=White, 1=Black).

2. Image Attributes

1. Image Resolution

The number of pixels in an image. Usually expressed as:

Width × Height

Example: An image that is 10 pixels wide and 10 pixels high has a resolution of 100 pixels.


2. Colour Depth (Bit Depth)

The number of bits used to store the colour for each individual pixel.

Depth Available Colours
1-bit 2 colours (Black & White)
2-bit 4 colours
8-bit 256 colours
24-bit (True Colour) Over 16 million colours

Effects of INCREASING Colour Depth

  • Quality: ↑ Improves (more accurate colours).
  • File Size: ↑ Increases (more bits stored per pixel).

3. Calculations (The Maths)

A. Calculating Total Colours

Formula: 2n (where n = colour depth)

Q: How many colours can 4 bits represent?
A: 24 = 2 × 2 × 2 × 2 = 16 Colours

B. Calculating File Size

You must memorise this formula:

Size in bits = W × H × D

(Width × Height × Colour Depth)

C. Unit Conversion

The result is in bits. You almost always need to convert it.

  • Bits → Bytes: Divide by 8
  • Bytes → Kilobytes: Divide by 1000 (or 1024 depending on question context)
Example Exam Question:
An image is 100x100 pixels with a colour depth of 8 bits.

1. 100 × 100 × 8 = 80,000 bits
2. 80,000 / 8 = 10,000 bytes
3. 10,000 / 1000 = 10 KB

4. Metadata

Metadata: "Data about data". It is extra information stored in the file header alongside the raw pixel data.

Why do we need it?

Without metadata, the computer represents the binary as one long string. It wouldn't know how wide the image is or when to start a new line!

Note: Metadata does NOT contain the actual pixel colours.

holiday_photo.jpg
Dimensions: 1920 x 1080
Res: 72 dpi
Bit Depth: 24-bit
Date: 25/11/2025
GPS: 51.507N, 0.12W
File Type: JPEG

5. Quick Recap

Before you finish, ensure you can answer these core J277 questions:

  • Define a Pixel: The smallest unit of a bitmap image.
  • Relationship: As Colour Depth increases, Quality increases and File Size increases.
  • The Math: Can you calculate file size in bytes? (W × H × D) / 8.
  • Metadata: List 3 examples (Height, Width, Date Created).

Ready for the Exam?

Remember to show your working out for calculations!