4 minutes read

There are several types of computer graphics. They vary in the principles of storing and forming an image when it's displayed on a monitor screen or when printed. Because of their peculiarities, different kinds of graphics are optimally used for different tasks.

In this topic, we will focus on raster and vector graphics, talk about their differences, learn about popular image formats and find out when these types of graphics are more suitable.

Raster graphics

Let's begin by familiarizing ourselves with the most popular type of computer graphics. This is raster graphics, a way of representing images as a set of pixels. Its other name is bitmap graphics.

In raster images, each pixel contains information about its color and occupies a certain position. The more pixels an image has, the higher its quality is. That's why raster images can convey many shades and complex color gradients. However, keep in mind that along with the quality of the image the file size will also increase.

Speaking of flaws, a raster image cannot be scaled without loss. If you upscale the image, new pixels' values must be inferred from their neighbors. Therefore, raster images that are greatly enlarged will appear blurry and fuzzy.

You can see how raster images "disintegrate" into pixels if you try to zoom in on them significantly.

a raster image with loss of quality on zoom in

Some examples of raster graphics include photos in electronic format, any scanned images, etc. This type of graphics is good to work with when processing photos or creating digital drawings that require very precise color shades. We can often understand right away by the file extensions that they store raster images. The most common file formats for bitmap graphics are JPG, PNG, WebP, GIF, TIFF.

Vector graphics

Another type of computer graphics that you have probably come across more than once is vector graphics. Vector graphics are a way of representing images through mathematical formulas. Unlike raster images, vector images do not require information about each pixel. They are formed by simple geometric objects: a point, a line segment, an arc of a circle, etc.

It takes little space to store vector images, and, most interestingly, the size of the image does not affect the size of the file. When scaling a vector image, the mathematical formulas with which it is described are recalculated. It helps to avoid the loss of quality.

a vector image without loss of quality on zoom in

This makes vector graphics optimal for high-precision graphics, in which it is important to maintain clear and sharp contours. Vector graphics is used for icons, logos, illustrations, diagrams, and mapping, but with vector graphics it is difficult to achieve detailed, photorealistic images with lots of complex color transitions. Vector images are often stored in the following file formats: SVG, AI, WMF, EMF, and others.

Conclusion

To summarize, let's remember the differences between vector and raster graphics.

  • Raster graphics, unlike vector graphics, allow you to easily create a drawing of any complexity. Raster images convey colors, shades, and shadows very clearly and subtly.

  • Vector images usually have a smaller file size than raster images.

  • Scaling degrades the quality of a raster image. At the same time, scaling a vector image causes no distortion.

The difference between raster and vector graphics is significant, but it does not prevent them from interacting with each other. For example, vector files can contain bitmap images, which opens up a lot of possibilities for the designers.

49 learners liked this piece of theory. 0 didn't like it. What about you?
Report a typo