Home | Lehre | Videos | Texte | Vorträge | Software | Person | Impressum, Datenschutzerklärung | Blog RSS

Vector Graphics

Idea

Do not store a bitmap of pixels but store the commands required to draw an image: Don't send the cake, send the recipe instead.

Types

The classical kind of vector graphics is an EPS (Encapsulated PostScript) file: It contains a program creating the drawing, expressed in Adobe's printer-oriented programming language PostScript. Such files may be stored using a space-saving binary encoding or they may be stored as plain text. In the latter case, they can be edited with a standard text editor, see the example given. PostScript is a full-fledged programming language with a "postfix" notation [German term: UPN, umgekehrte polnische Notation] that is uncommon today, but very efficient to read (for the computer, not for the programmer). PostScript can be interpreted (= rendered to a bitmap) by all high-end computer printers. On top of that, it can be interpreted by software such as Adobe Photoshop or Ghostscript/GSview. The AI file format of Adobe Illustrator is related to EPS.

Adobe PDF (Portable Document Format) is a sort of light-weight EPS. Initially, it offered no programmability. In the meantime, however, it has been equipped with functions for the Web (such as Links ot URLs), functions for forms, and even a 3D rendering engine.

Microsoft XPS (XML Paper Specification), formerly named Metro, is aimed at offering an alternative to Adobe PDF. It is supported by the WPF (Windows Presentation Framework, formerly named Avalon) of .NET 3.0, which is part of Windows Vista. One possibly decisive difference to PDF is that XPS comes with a free official toolkit for application developers.

Microsofts also offers vector formats that directly record Windows drawing commands: WMF (Windows metafile), EMF (Enhanced Metafile), and EMF+, with the different types reflecting the evolution of Windows' graphics capabilites. You may record commands into a metafile using standard graphics commands, and you can look at the recorded commands and draw them as well. However, the Metafile.Save member function will only save a PNG bitmap disguised as a metafile.

Adobe (ex Macromedia) Flash started out as a proprietary system to create and render interactive and animated vector graphics. Through a number of generations, it has gained a full-fleged programming language as well.

SVG is an open XML-based language for interactive and animated vector graphics, once embraced and now abandoned by Adobe. Particularly remarkable ist the free editor: Inkscape.

Primitives

Not every vector graphics file format can store any type of drawing command. Color gradients (in particular, freely shaped ones) and transparency effects have to be simulated or to be discarded for saving in PostScript 1 or WMF, for instance.

The universal primitives that are available in every standard are:

Cubic Curves