What's the difference between raster and vector? This question is asked by many newbie designers, webmasters, marketers and other interested individuals - and sometimes the answers can be as confusing as the names raster and vector themselves. It's time to clarify the difference between raster and vector once and for all.
Rasters and vectors defined
A raster image is made of up pixels, each a different color, arranged to display an image.
A vector image is made up of paths, each with a mathematical formula (vector) that tells the path how it is shaped and what color it is bordered with or filled by.
The major difference is that raster image pixels do not retain their appearance as size increases - when you blow a photograph up, it becomes blurry for this reason. Vector images do retain appearance regardless of size, since the mathematical formulas dictate how the image is rendered.
Pros and cons of rasters and vectors
Raster images are capable of displaying a myriad of colors in a single image and allow for color editing beyond that of a vector image. They can display finer nuances in light and shading at the right resolution. Vector images are scalable, so that the same image can be designed once and resized infinitely for any size application - from business card to billboard.
Raster images cannot be made larger without sacrificing quality. Vector images cannot display the natural qualities of photographs. Raster images are often large files, while vector images are relatively lightweight. Raster images are used in web and print, vector images cannot as of this writing be used in electronic format - they must be converted to a raster first. Vectors display at the highest resolution allowed by the output device, while rasters blur when blown up.
When should I use a raster or a vector?
Raster images are primarily used with photos, which is why Photoshop is a raster editing program. Adobe Illustrator, on the other hand, is a vector drawing program that automatically creates your vector formulas as you draw. Logos, letterhead, and other graphic elements are typically best created as vectors; while photographs are best left for rasters. All vectors must be converted to raster for web use. Text is typically rendered in vector format.
If you're not sure whether you should create a raster or vector file, follow this simple rule of thumb: If you're drawing something from scratch with only a few colors, go with vector. If you're editing a photo with multiple colors, go with raster. Many projects use vector drawings and vector images together - a brochure, for example, might include a corporate logo (vector) plus an image of happy customers (raster).
For more information on rasters and vectors, visit the following resources (some have working examples):