---
title: "Raster versus vector graphics"
subject: "Computer Graphics"
chapter: 1
key: "semester_5/computer_graphics:raster-vs-vector-graphics"
source: https://www.bctengineer.com/q/semester_5/computer_graphics/raster-vs-vector-graphics
site: BCT Engineering
---

# Raster versus vector graphics

Computer Graphics · Chapter 1: Introduction and Application

- Asked in: 2074 Asoj, 6 marks; 2079 Baisakh, 6 marks; 2078 Bhadra, 6 marks; 2076 Asoj, 2 marks (asked 4 times)
- Video: [Raster Bitmap vs Vector Graphics](https://www.youtube.com/watch?v=U-X_rosRORg) — Cary Hawkins
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/computer_graphics/raster-vs-vector-graphics
- Whole chapter: https://www.bctengineer.com/md/semester_5/computer_graphics/chapter-1

## Question

Distinguish between raster and vector graphics methods. When do we prefer each of them?

## Short answer

Raster graphics store images as pixel grids; best for photographs and realistic shading. Vecor graphics store geometric primitives (lines, curves); they scale without quality loss and are preferred for logos, diagrams, and CAD where editing and resolution independence are needed.

## Answer

**Raster graphics** stores an image as a grid of pixels, each with its own colour value (e.g. BMP, JPEG, PNG). **Vector graphics** stores an image as mathematical descriptions of geometric objects such as points, lines, curves and polygons, with their attributes (e.g. SVG, PDF, CDR).

| Point | Raster graphics | Vector graphics |
|---|---|---|
| Basic element | Pixel | Geometric primitive (line, curve, polygon) |
| Storage | Colour of every pixel; large files | Equations and attributes; small files |
| Scaling | Becomes blocky or blurred (pixelated) when enlarged | Scales to any size without loss of quality |
| Realism | Excellent for photographs and shaded images | Poor for photo-realistic images |
| Editing | Edit pixel by pixel | Edit individual objects easily (move, recolour, resize) |
| Display | Directly shown on raster monitors | Must be converted to pixels (scan conversion) for display |
| Output device | Raster monitor, laser printer | Plotter, also raster devices after conversion |
| Tools | Photoshop, Paint, GIMP | CorelDRAW, Illustrator, Inkscape, AutoCAD |

```text
Raster:  .##.     Vector:  line (0,0)-(3,3)
         ####              circle (5,5), r=2
         .##.              colour = red
```

**When to prefer raster:** photographs, realistic and shaded scenes, paintings, textures, games and video, where each pixel's colour matters.

**When to prefer vector:** logos, text fonts, maps, engineering drawings, CAD and diagrams, which must be resized without quality loss, need small files and be edited as separate objects.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What is the basic element of raster graphics?
   A. The pixel, each with its own colour value
   B. A geometric primitive such as a line
   C. A mathematical equation
   D. A display list command
   Answer: A. Raster images are grids of pixels; vector images use geometric primitives. (Key point: Basic element)

2. What happens when a raster image is enlarged a lot?
   A. It stays sharp at any size
   B. It becomes blocky or pixelated
   C. Its file size shrinks
   D. It is converted to equations
   Answer: B. Pixels are fixed; enlarging shows them. Vector images scale without loss. (Key point: Scaling)

3. Which is the best choice for vector graphics?
   A. A photograph of a landscape
   B. A shaded realistic painting
   C. A company logo that must be resized to many sizes
   D. A video game texture
   Answer: C. Logos, fonts, maps and CAD need scalability, small files and object editing. (Key point: When to prefer vector)

4. Why is raster preferred for photographs?
   A. It has the smallest file size
   B. It is edited as separate objects
   C. It scales to any size without loss
   D. Each pixel's colour can be stored, giving realistic shaded images
   Answer: D. Vector is poor for photo-realism; raster stores colour per pixel. (Key point: When to prefer raster)

## Related in Computer Graphics

- [Random scan versus raster scan display](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Arandom-vs-raster-display) — Computer Graphics, chapter 1, asked 7×
- [Raster display and frame buffer load time](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Araster-system-load-time) — Computer Graphics, chapter 1
- [Pixel access rate of raster system](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Apixels-per-second-access-time) — Computer Graphics, chapter 1
- [Short note: Raster scan display](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Ashort-note-raster-scan-display) — Computer Graphics, chapter 1
- [Raster animation](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Araster-animation) — Computer Graphics, chapter 1
- [Explain vector display](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Aexplain-vector-display) — Computer Graphics, chapter 1

## Related in other subjects

- [Image versus graphics](https://www.bctengineer.com/question.md?key=semester_8%2Fmultimedia_system%3Aimage-vs-graphics) — Multimedia System, chapter 3, asked 2×
- [Bitmap images; bitmap versus vector](https://www.bctengineer.com/question.md?key=semester_8%2Fmultimedia_system%3Abitmap-images-vs-vector) — Multimedia System, chapter 3
- [Vector computation for performance](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Avector-computation) — Computer Organization and Architecture, chapter 4
- [Structure versus array](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Astructure-vs-array) — Computer Programming, chapter 8, asked 4×
