Raster vs. Vector

There are two broad categories of computer graphics - vector and raster.

Raster images, also called bitmaps, consist of a grid of individual pixels where each pixel can be a different color or shade. The edge of images become jagged as they are increased. Rasters are often characterized by 3-dimensional appearance.

Common formats are JPG, BMP, TIFF, PNG, EPS, WEBP, and GIF,. More on these later.

Example of raster style:



Vector images are composed of a collections of lines and other geometric shapes, each defined by a mathematical formula. They can be sized infinitely without pixilation. Vectors are usually characterized by 2-dimensional appearance, such as in a drawing.

Common formats are AI, SVG, PDF, and EPS.

Example of vector style:

Processing shapes and images are by default vectors. However, Processing works with many images formats.


Overview of Popular Image Formats

The Cloudinary website has an informative table that compares the vector and raster image formats. It also explains when to use them. See it here.