Loading...
A bitmap stores samples on a pixel grid; a vector graphic stores descriptions of objects. Choose the representation from the image and the operations required.
What you'll be able to do
A bitmap associates colour information with each pixel in a rectangular grid. Width×height gives pixel count. Colour depth is the number of stored bits per pixel in the stated model; b bits provide up to 2ᵇ colour codes. Indexed palettes and separate channels require the conventions supplied.
Resolution can refer to physical pixel density, commonly pixels per inch, while everyday usage also calls width and height the image’s resolution. State which meaning is intended. Changing only a print-density label does not create new sampled detail or necessarily change the stored pixel count.
For an uncompressed fixed-depth bitmap, raw bits=width×height×bits per pixel. Divide by eight for bytes and then apply the requested prefix. File headers, palettes, transparency channels and padding can add storage beyond this ideal calculation.
Increasing each linear dimension by two gives four times as many pixels. Increasing colour depth changes the amount stored per pixel and the available colour codes. Neither operation can recover original detail that was never captured; interpolating pixels is not equivalent to a better source measurement.
A vector graphic stores primitives such as lines, circles, curves and filled shapes, with properties including coordinates, dimensions, stroke width and colour. A renderer generates pixels for the chosen display or output resolution. Editing one object can be simpler than altering many raster samples.
Vectors suit diagrams, logos and geometric illustrations, while bitmaps suit sampled photographs and complex continuous textures. Vector files are not always smaller: size depends on the number and complexity of objects. A vector image must still be rasterised for an ordinary pixel display, so distinguish stored description from rendered output.
| Representation | Stored information | Useful application |
|---|---|---|
| Bitmap | Pixel colour samples | Photograph |
| Vector | Objects and properties | Scalable technical diagram |
Attempt the task before opening its worked response. Record each change of state, explain the rule used, and check the result against the original requirements. Code examples labelled Python 3 use that language’s conventions; pseudocode states its own assumptions.
Common mistakes to avoid
Key takeaways
Test yourself
Answer a few questions, then review anything you missed.
Start with the quiz above to check the key ideas. You can also choose another topic from the practice library.