What would the world be like if we didn't have both vanilla and chocolate ice cream? We'd probably all be a few inches smaller around the waist, right? Seriously though, just as there are two main flavors of ice cream, there are also two main flavors of computer graphics. One is pixel-based (these graphics are also referred to as rasters or bitmaps) and the other is vector-based (also referred to as object-based). Pixel-based graphics and vector-based graphics are different conceptually and each have its own strengths and weaknesses. For example, Photoshop is a program that is primarily geared to working with pixel-based images and is great for photographic content. Illustrator, on the other hand, is primarily a vector-based drawing application and excels in creating illustrations. In addition, just like a vanilla-and-chocolate-swirl ice cream cone, an image can contain a mixture of both pixel- and vector-based information. In Illustrator, you can draw a shape, which is a vector, and then apply a soft drop shadow, which is a raster. In fact, you'll find that more and more today, graphics files contain a mixture of both vector and raster content (Figure 2.1). Figure 2.1. An example of a file that contains both vectors and pixels. In this case, the text is a vector, but the soft drop shadow is a raster.
Once you've learned how these two graphic types differ in makeup (see the sidebar, "Featured Match-Up: Vectors vs. Pixels"), you can begin to understand how to use them and what their benefits are. High-resolution raster images can produce photorealistic paintings and actual photographs. Control over each and every pixel in the image gives the creative professional complete freedom to change even the smallest of details. However, pixel-based images have a finite level of detail, defined by the pixels per inch (ppi) or resolution of the file. Enlarging a raster-based file is akin to viewing a sheet of graph paper with a magnifying glassthe squares simply get bigger. In contrast, vector graphics, which are defined by plotted anchor points, can be scaled to any size with no loss in detail or quality. As the image is resized, the computer does the math and plots the points at new coordinates and then redraws the Bézier path that connects them (Figure 2.2). Instead of storing millions of pixels in a file, a computer only needs to keep track of the coordinates of these anchor points and information on how to fill and stroke the paths that connect them. Vector graphics are also easier to edit because you have distinct shapes to work with, not miniscule pixels. Keep in mind, however, that this object-based approach translates to less control because you have no access to individual pixels. Figure 2.2. The image on top is a raster file with a section shown enlarged to 200 percent. The result is the same image with larger pixels. The image on the bottom is a vector file with a section shown enlarged to 200 percent as well, but the quality of the image remains intact.
As you go through the remainder of this book, you'll get a better understanding of how vectors and pixels work and you'll see real-world examples of how they are used.
By truly understanding the benefits of these formatsand their limitationsyou'll be able to achieve any look or design in the most efficient manner. For more information on this hybrid of graphics files, see Chapter 8, Mixing It Up: Working with Vectors and Pixels. |