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 fun­da­ment­ally in their prop­er­ties: pixel graphics and vector graphics. We tell you how these graphic types are built and how their dif­fer­ences determine which ap­plic­a­tions 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 colour 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 colour depth of these pixels. And while the total number of picture elements de­term­ines a graphic’s height and width (and its res­ol­u­tion), colour depth defines the colour and bright­ness values for each picture element.

These prop­er­ties 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 in­ter­de­pend­ency 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 in­di­vidu­al picture elements; rather they are made up of geometric prim­it­ives, like lines, circles, or curves. These are defined through para­met­ers such as beginning points, ending points, radii, edge length, line width, colours, and filling patterns. Modern vector drawing ap­plic­a­tions are also able to render colour gradients as well as trans­par­ency. These objects aren’t defined as an ap­pos­i­tion of pixels; instead, they are logically described according to their prop­er­ties. For example, all that’s needed to describe a simple circle with vector graphics is: the position of its center, the radius, colours 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 para­met­ers can be re­cal­cu­lated to fit new sizes, these images can be scaled up without losses to quality. By com­par­is­on, 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 re­quire­ments.
Given that all display mediums (screen, print) only show images as raster graphics, vector graphics have to be converted (ras­ter­isa­tion) before they can be depicted. Depending on the described object’s com­plex­ity, 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 Il­lus­trat­or, Corel Draw, Inkscape

Range of ap­plic­a­tion

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

Ras­ter­iz­a­tion and image tracing (vec­tor­iz­a­tion)

While con­vert­ing 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 vec­tor­isa­tion program, like Xara Xtreme or Inkscape, which feature functions like Bitmap Tracer or Potrace. Such con­ver­sions are es­pe­cially error prone due to the fact that the image tracing programs only mimic the complex colour gradients and bright­ness curves of pixel graphics. These are displayed in distinct bands in a process known as banding.

Ad­vant­agesDis­ad­vant­ages
Pixel graphics
  • Rich in both colour and bright­ness gradation
  • Each and every in­di­vidu­al pixel can be edited
  • Scaling is as­so­ci­ated with losses of quality
  • Com­pres­sion can lead to losses of quality
  • High memory re­quire­ments for high-quality graphics
  • Image tracing can be laborious
Vector graphic
  • Scalable without losses to quality
  • Can be com­pressed without quality losses
  • Small file size
  • Object prop­er­ties can be adjusted
  • Easy to raster
  • Not suitable for complex graphic displays  
  • Ras­ter­isa­tion required for display
Go to Main Menu