Published by Patrick Mutisya · 14 days ago
Justify the use of a bitmap image or a vector graphic for a given task.
The table below summarises the technical contrasts that influence the choice of format.
| Aspect | Bitmap Image | Vector Graphic |
|---|---|---|
| Storage | Depends on resolution (pixels) and colour depth. Size grows with \$N = w \times h\$ where \$w\$ and \$h\$ are width and height in pixels. | Stores geometric primitives; size grows with number of objects, not with display dimensions. |
| Scalability | Scaling up causes pixelation; quality degrades. | Infinite scalability – curves are recalculated for any size. |
| Editing | Pixel‑level editing; complex for large images. | Object‑level editing; easy to modify shapes, colours, and stroke widths. |
| Typical Uses | Photographs, detailed textures, complex colour gradients. | Logos, icons, technical diagrams, fonts. |
| Rendering Speed | Fast to display; already rasterised. | Requires real‑time rasterisation; may be slower for very complex scenes. |
Yes → Bitmap.
Yes → Vector.
Bitmap for small, simple images; Vector for line‑art and logos.
Vector provides easier element‑wise editing.
The logo must appear on business cards, billboards, and a website. It consists of simple geometric shapes and text.
Recommended format: Vector. The logo can be scaled from 2 mm to 2 m without loss of quality, and individual elements (colour, stroke) can be edited easily for different branding needs.
The article requires a high‑resolution photograph of a landscape.
Recommended format: Bitmap (e.g., JPEG or PNG). Photographs contain complex colour gradients that cannot be represented accurately with vectors. A bitmap preserves the visual detail.
The map includes roads, landmarks, and labels that must be zoomable.
Recommended format: Vector. Vector paths allow smooth zooming and panning. Labels remain crisp at any scale, and the overall file size stays modest because the map consists of geometric primitives.
Sprites are small, pixel‑art characters used in a 2‑D platformer.
Recommended format: Bitmap. Pixel art relies on exact pixel placement; converting to vector would alter the intended visual style.
When estimating storage for a bitmap, the following formula is useful:
\$\text{File size (bits)} = w \times h \times d\$
where \$w\$ = width in pixels, \$h\$ = height in pixels, and \$d\$ = colour depth (bits per pixel).
For a vector graphic, the storage is roughly proportional to the number of primitives \$p\$:
\$\text{File size (approx.)} = k \times p\$
where \$k\$ is an average number of bytes per primitive (depends on the format, e.g., S \cdot G).
Choosing between bitmap and vector graphics hinges on the nature of the visual content, scalability requirements, editing needs, and storage constraints. Photographic, detailed images favour bitmaps, while logos, icons, diagrams, and any content that must scale cleanly are best served by vectors.