ICT 0417 – Topic 12: Images – Reducing File SizeTopic 12 – Images
Objective
Know and understand that reducing the file size of an image can be achieved by reducing the image resolution or the colour depth.
What Determines an Image’s File Size?
The size of a digital image file is primarily determined by three factors:
- Resolution (number of pixels)
- Colour depth (bits per pixel)
- Compression method (lossless vs. lossy)
In this note we focus on the first two factors because they can be changed without altering the compression algorithm.
Resolution
Resolution is the total number of pixels that make up the image, expressed as width × height (e.g., 1920 × 1080). The total pixel count is:
\$\text{Total pixels} = \text{width} \times \text{height}\$
When the resolution is reduced, the number of pixels decreases, which directly reduces the amount of data required to store the image.
Colour Depth
Colour depth (also called bit depth) is the number of bits used to represent the colour of each pixel.
- 1‑bit = 2 colours (black & white)
- 8‑bit = 256 colours (often used for GIF)
- 24‑bit = 16 777 216 colours (true colour, common for JPEG/PNG)
- 32‑bit = 24‑bit colour + 8‑bit alpha channel (transparency)
The amount of data for an uncompressed image can be calculated as:
\$\text{File size (bits)} = \text{Total pixels} \times \text{Colour depth (bits)}\$
Dividing by 8 converts bits to bytes.
How Reducing Resolution or Colour Depth Reduces File Size
- Reducing resolution removes pixels. Fewer pixels mean fewer colour values to store.
- Reducing colour depth uses fewer bits per pixel. The same number of pixels now requires less data.
Practical Example
Consider an image that is 1200 × 800 pixels.
| Colour Depth | Total Pixels | File Size (bytes) |
|---|
| 24‑bit (true colour) | 960 000 | 2 880 000 bytes (≈2.75 MB) |
| 8‑bit (256 colours) | 960 000 | 960 000 bytes (≈0.92 MB) |
If the resolution is halved to 600 × 400 (still 24‑bit), the file size becomes:
\$\text{File size} = (600 \times 400) \times 24 \div 8 = 720\,000\text{ bytes} \approx 0.69\text{ MB}\$
This shows that either method can dramatically reduce file size.
Advantages and Disadvantages
- Reducing resolution
- Pros: Smaller files, faster loading, less bandwidth.
- Cons: Loss of detail; may appear pixelated when enlarged.
- Reducing colour depth
- Pros: Good for simple graphics, icons, and images with limited colours.
- Cons: Colour banding and loss of subtle colour gradients.
When to Use Each Method
Choose the technique based on the purpose of the image:
- Photographs – usually keep high colour depth; reduce resolution if a smaller display is needed.
- Logos, icons, line art – can often reduce colour depth without noticeable quality loss.
- Web pages – balance between acceptable visual quality and fast page loading.
Step‑by‑Step Procedure (Common Software)
- Open the image in an editor (e.g., GIMP, Photoshop, Paint.NET).
- Choose “Image Size” or “Resize”. Enter a lower width and height while maintaining the aspect ratio.
- To change colour depth, look for “Mode” or “Convert to Indexed Colour”. Select the desired number of colours (e.g., 256).
- Save the image using an appropriate format (JPEG for photographs, PNG/GIF for graphics).
- Check the file size and visual quality; adjust settings if necessary.
Key Points to Remember
- File size = (pixels) × (bits per pixel) ÷ 8.
- Reducing resolution cuts the number of pixels.
- Reducing colour depth cuts the bits needed per pixel.
- Both methods can be combined for greater reduction.
- Always consider the intended use of the image before reducing quality.
Suggested diagram: A visual comparison of the same image at high resolution/colour depth versus reduced resolution and reduced colour depth.