Published by Patrick Mutisya · 14 days ago
Show understanding of the effects of changing elements of a bitmap image on the image quality and file size.
Increasing the number of pixels raises the total pixel count:
\$\text{Total pixels}= \text{width} \times \text{height}\$
More pixels give finer detail (higher quality) but increase file size roughly proportionally to the pixel count.
Each pixel requires \$b\$ bits, where \$b\$ is the colour depth. File size (uncompressed) can be estimated by:
\$\text{File size (bits)} = \text{width} \times \text{height} \times b\$
Higher colour depth allows more colours (better gradients, less banding) but also enlarges the file.
Two main types:
The compression ratio determines the trade‑off between file size and perceived quality.
Different formats implement colour depth and compression differently. For example:
| Element | Effect on Image Quality | Effect on File Size |
|---|---|---|
| Resolution (pixels) | Higher resolution = more detail, smoother edges | File size ∝ width × height (linear increase) |
| Colour Depth (bits per pixel) | More colours = smoother gradients, less banding | File size ∝ colour depth (linear increase) |
| Lossless Compression | No visual degradation | Typical reduction 2–3 : 1; depends on image complexity |
| Lossy Compression | Potential artefacts (blocking, blurring) if compression high | High reduction (10 : 1 up to 50 : 1); size inversely related to quality setting |
| File Format | Determines how colour depth & compression are applied | Varies: BMP > PNG > JPEG in typical size for same image |
Consider a photograph of 800 × 600 px.
\$\text{Size}=800 \times 600 \times 24 \text{ bits}=11\,520\,000 \text{ bits}\approx 1.44\text{ MB}\$