Skip to main content

Raster versus vector graphics

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.

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

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).

PointRaster graphicsVector graphics
Basic elementPixelGeometric primitive (line, curve, polygon)
StorageColour of every pixel; large filesEquations and attributes; small files
ScalingBecomes blocky or blurred (pixelated) when enlargedScales to any size without loss of quality
RealismExcellent for photographs and shaded imagesPoor for photo-realistic images
EditingEdit pixel by pixelEdit individual objects easily (move, recolour, resize)
DisplayDirectly shown on raster monitorsMust be converted to pixels (scan conversion) for display
Output deviceRaster monitor, laser printerPlotter, also raster devices after conversion
ToolsPhotoshop, Paint, GIMPCorelDRAW, Illustrator, Inkscape, AutoCAD
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.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Graphics chapter 1 questions →