Raster and Vector Graphics
A computer stores an image in two ways: as a set of dots or as a set of geometric shapes. We learn how they differ and where each is used.
All topics (6 of 11)
Chapter 1. Types of Algorithms
Chapter 2. Office Programs
Chapter 3. Computer Graphics
Chapter 4. The Internet and Safety
Chapter 5. Encoding Information
Computer graphics is the creation and processing of images on a computer. There are two main ways to store an image. In raster graphics an image is stored as a grid of many tiny colored dots called pixels; photographs are like this.
In vector graphics an image is described not by dots but by geometric shapes, such as lines, circles and curves, along with their coordinates, colors and line widths. This is why a vector picture can be enlarged as much as you like without losing quality, while a raster picture breaks up into “squares” when enlarged. The file size of vector pictures is usually small.
Raster images are stored in formats such as .jpg, .png and .bmp, and vector images in formats such as .svg. Raster graphics suit photographs and complex colored pictures, while vector graphics suit logos, drawings and diagrams. The quality of a raster image depends on its resolution (the number of pixels): the more pixels, the sharper the picture, but the larger the file.
Key takeaways
- A raster image is made of pixels, a vector image of geometric shapes.
- A vector picture can be enlarged without losing quality.
- Raster graphics suit photographs, vector graphics suit logos and drawings.
- The quality of a raster image depends on its resolution (number of pixels).
Practice tasks
- Draw a small picture in Paint and zoom in to 800%: can you see square pixels? Write down the result.
- Classify as “raster” or “vector”: a phone photograph, a school logo, a map drawing, a screenshot.
- Open an
.svgfile in a browser (or draw one in a vector editor) and zoom in to check that its quality does not change.
Review questions
Test yourself: think first, then reveal the answer.
1What is a pixel?Show answerHide answer
The smallest colored dot of a raster image.2Why are logos often made in vector graphics?Show answerHide answer
Because a vector logo can be scaled from a business card to a billboard without losing quality.
0 of 11 topics completed
Sign in to mark