How did you like the article?
0
How did you like the article?
0

Pixel graphics or vector graphics? Comparing the pros and cons

As well as text-based content, images are key elements of any website. In web design, there are two different types of computer graphics, which differ fundamentally in their properties: pixel graphics and vector graphics. We tell you how these graphic types are built and how their differences determine which applications they’re best suited for.

Pixel graphics

The smallest unit of every pixel graphic are picture elements, also known as pixels. Each of these units is assigned a special color value. As these computer graphics are composed of square-shaped pixels that are arranged in grids, they’re also referred to as raster graphics. The main features used to describe pixel graphics are the number of picture elements in use and the color depth of these pixels. And while the total number of picture elements determines a graphic’s height and width (and its resolution), color depth defines the color and brightness values for each picture element.

These properties allow pixel graphics to depict detailed images. Most people are familiar with the term, pixel, through digital cameras and scanner images. Given that pixel graphics consist of a fixed number of picture elements, both quality as well as the amount of memory needed for storage are dependent on the number of pixels. The more picture elements a raster graphic contains, the larger the image it’ll be able to display and the more storage its file requires. This interdependency between image quality and pixel number means that pixel graphics cannot be scaled-up without suffering losses to quality.

Vector graphics

Unlike pixel graphics, vector graphics aren’t composed of individual picture elements; rather they are made up of geometric primitives, like lines, circles, or curves. These are defined through parameters such as beginning points, ending points, radii, edge length, line width, colors, and filling patterns. Modern vector drawing applications are also able to render color gradients as well as transparency. These objects aren’t defined as an apposition of pixels; instead, they are logically described according to their properties. For example, all that’s needed to describe a simple circle with vector graphics are: the position of its center, the radius, colors and line weights for depicting the object in different sizes.

This is where vector graphics’ biggest advantage over raster graphics can really be observed: given that a vector graphic’s saved parameters can be recalculated to fit new sizes, these images can be scaled up without losses to quality. By comparison, a circle depicted through a pixel graphic will display ‘jaggies’ (stair-like lines where there should be smooth curves instead) or an aliasing effect. In contrast to pixel graphics, the display size of vector graphics has no effect on memory requirements.

Given that all display mediums (screen, print) only show images as raster graphics, vector graphics have to be converted (rasterization) before they can depicted. Depending on the described object’s complexity, this step may be costly in terms of both time and computing capacity.

File formats and graphic programs

There’s a wide selection of graphic programs for creating and editing both raster and vector graphics; these support a range of specific file formats. The following chart shows a sample of common graphic formats and editing programs.

 

Graphic format

Graphic program

Pixel graphic:

TIF, JPG, BMP, PNG, GIF

Adobe Photoshop, GIMP, Corel PaintShop Pro

Vector graphic:

SVG, EPS, AI, CDR, WMF

Adobe Illustrator, Corel Draw, Inkscape

Range of application

Vector graphics’ ability to be scaled up without loss of quality makes them especially well-suited for displaying diagrams, company logos, geometric figures, fonts, icons, and technical drawings. On the other hand, complex images, like digital photos featuring different color and brightness values, cannot be depicted without losses to quality. Here, it’s best to use pixel graphics.

Rasterization and image tracing (vectorization)

While converting vector graphics into pixel graphics generally isn’t a difficult task, the reversal of this procedure can be quite demanding. Image tracing a raster graphic is either carried out by manually tracing it or with the help of a vectorization program, like Xara Xtreme or Inkscape, which feature functions like Bitmap Tracer or Potrace. Such conversions are especially error prone due to the fact that the image tracing programs only mimic the complex color gradients and brightness curves of pixel graphics. These are displayed in distinct bands in a process known as banding.

AdvantagesDisadvantages
Pixel graphics
  • Rich in both color and brightness gradation
  • Each and every individual pixel can be edited
  • Scaling is associated with losses of quality
  • Compression can lead to losses of quality
  • High memory requirements for high-quality graphics
  • Image tracing can be laborious
Vector graphic
  • Scalable without losses to quality
  • Can be compressed without quality losses
  • Small file size
  • Object properties can be adjusted
  • Easy to raster
  • Not suitable for complex graphic displays  
  • Rasterization required for display

Images Themes