1. Bitmaps & 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
0 1 0 11 1 1 10 0 0 01 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:
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)
A: 24 = 2 × 2 × 2 × 2 = 16 Colours
B. Calculating File Size
You must memorise this formula:
(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)
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
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.
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!