Vector graphics are infinitely scalableimages created using mathematically defined elements.- In simpler terms, you can make a vector graphic as large or small as you want without losing any quality.
- Vector
graphics are made from points, lines, curves, and color fills, making them different from regular "raster" images.
If you have an interest in computer graphics or design, it doesn't take long to realize there are two different kinds of graphics: vectors and rasters.
Although you might not be able to tell the difference between the two at first glance, they're fundamentally different in how they're created and used.
What to know about vector graphics
Vector graphics are images created using elements that are independent of the size of the image, and common vector file formats include EPS and SVG.
In contrast,
The concept behind raster images is fairly easy to understand, especially since you probably have some experience with pixels on a computer screen.
Vector graphics aren't as intuitive, though. Vector images are made from "vector primitives," which are mathematically defined elements like points, lines and curves, as well as colors that fill in-between. By combining primitives, you can draw sophisticated and complex images. We'll break down exactly what that means in a bit.
The differences between vector and raster images is even apparent in the tools that professionals use to create and edit them.
But Adobe Illustrator is a vector design program where there's no pixel-level color control. Instead, you work by drawing using a library of lines, points, and other shapes. These shapes aren't defined by the pixels on screen, but instead by a mathematical algorithm.
The differences between vector and raster graphics
So rasters use pixels, and vectors use math. But what does that really mean for the user? Why aren't they interchangeable?
In a nutshell, vector graphics' mathematical nature makes them "
A raster image, on the other hand, is purpose-made for a certain resolution, and the image is literally defined as a grid. If you could inspect the code contained in a raster image file, you would see that it tells the computer exactly which color to place in each pixel.
This means that a raster image will lose sharpness if you display or print it larger than it was intended - you've no doubt seen this when zooming in on a detail in a JPG image.
It's also worth noting that while a vector graphic can be easily converted to a raster - the raster image is "locked in" at the resolution specified when it was converted - a raster image can't generally be converted to vector, though some tools can convert simple raster images to vector in a limited way.
Pros and cons of vector and raster images
The bottom line is that the two kinds of graphics have their own advantages and disadvantages.
Vector graphics
- Infinitely scalable with no loss of sharpness.
- Easily convertible to a raster image at a given resolution for importing into other projects.
- Excellent for use in illustrations on the web and in print because the files can scale to any size, and illustrations are easy to represent with lines, curves, and color fills.
Raster graphics
- The best choice for photographs because raster images allow for precise and detailed color control on a pixel-by-pixel basis.
- Not scalable, so it loses quality when enlarged.
- Usually can't be converted to vector graphics.