Pixels and Images
Photoshop lets you do all kinds of nifty stuff, but at its heart, it pretty much all comes down to pixels. To use Photoshop effectively, you need to understand the basic attributes of pixel-based images.
Every pixel-based image has three basic characteristics: dimension, bit depth, and color model (which Photoshop refers to as image mode).
Dimension is the attribute that is loosely related to size. Pixel-based images are always rectangular grids made up of little squares, like checkerboards or chessboards or parquet floors in your kitchen; those little squares are individual pixels (see Figure 3-1). The dimensions of the pixel grid refer to the number of pixels along its short and long dimensions. A chessboard is always eight squares by eight squares. The grid of pixels that makes up your computer screen might be 1200 by 1600. A 6-megapixel digital camera typically produces an image that's 3072 by 2048 pixels.
Figure 3-1 Bitmaps as grids of squares
Image dimensions are limited by the capabilities of your capture device, the amount of available storage space, your patience—the more pixels in the image, the more space it needs, and the longer it takes to do things to it—and in Photoshop, by the 300,000-by-300,000-pixel image size limit.
Dimension is only indirectly related to physical size or resolution: Until you specify how large each pixel is (called "resolution") an image has no specific size. But resolution and size aren't innate to the digital image; they're fungible qualities. That is, the same 100-by-100 pixels can be made as small as a postage stamp or as large as a billboard. We'll discuss resolution and why it's important in more detail later in this chapter.
Bit depth is the attribute that dictates how many shades or colors the image can contain. Because each pixel's tone or color is defined by one or more numbers, the range in which those numbers can fall dictates the range of possible values for each pixel, and hence the total number of colors (or shades of gray) that the image can contain.
For example, in a 1-bit image (one in which each pixel is represented by one bit of information—either a one or a zero) each pixel is either on or off, which usually means black and white. (Of course, if you printed with red ink on blue paper, the pixels would be either red or blue.)
With two bits per pixel, there are four possible combinations (00, 01, 10, and 11), hence four possible values, and four possible colors or gray levels (see Figure 3-2). Eight bits of information give you 256 possible values; in 8-bit/channel RGB images, each pixel actually has three 8-bit values—one each for red, green, and blue (see Figure 3-3), for a total of 24 bits per pixel. (In 8-bit/channel CMYK there are four channels rather than three, so a CMYK pixel takes 32 bits to describe.)
Figure 3-2 Bit depth
Figure 3-3 When RGB and CMYK combine
Photoshop lets you work with a variety of bit depths, up to the 32 floating-point bits per channel in the new HDR (High Dynamic Range) mode. But for most work, the common bit depths are 8-bit/channel (24-bit RGB and 32-bit CMYK) and 16-bit/channel (48-bit RGB).
How much is enough? 8-bits-per-channel provides 16.7 million possible RGB color definitions, which is a much larger number than the number of unique colors the human eye can distinguish, and certainly much larger than the number of unique colors we can print.
Why capture many more colors than we print, or even see? The simple answer is that the larger number of bits gives us much more editing flexibility. Whatever number of shades you start with, each edit you make has the inevitable result of reducing that number. As you'll see in Chapter 6, Image Adjustment Fundamentals, every edit opens up gaps between some adjacent pixel values and smooshes others together, reducing the total number of shades.
So bit depth has an important relationship to the quality of an image, which we'll cover more fully later in this chapter, and to its ability to withstand editing, which we'll cover in most of the rest of this book.
Bit depth and dimension each tell part of the story, but the third essential attribute of images, the image mode, is the one that dictates whether all those numbers represent shades of gray, or colors. As we mentioned earlier, computers know nothing about tone or color; they just crunch numbers. Image mode is the attribute that provides a human meaning for the numbers they crunch.
In general, the numbers that describe pixels relate to tonal values, with lower numbers representing darker tones and higher ones representing brighter tones. In an 8-bit/channel grayscale image, 0 represents solid black, 255 represents pure white, and the intermediate numbers represent intermediate shades of gray.
In the color image modes, the numbers represent shades of a primary color rather than shades of gray. So an RGB image is actually made up of three grayscale channels: one representing red values, one green, and one blue. A CMYK image contains four grayscale channels: one each for cyan, magenta, yellow and black.
The one exception we mentioned earlier is the Indexed Color mode, where each value represents an arbitrary color that gets loaded from a lookup table. Indexed Color images can contain only 256 colors, and since the color values are arbitrary (number 1 could be red, number 2 could be blue, and so on), most of Photoshop's editing tools don't work. In the other modes, we can change tone and color by adjusting the numbers to make a pixel, or one channel of a pixel, lighter or darker, but if we did that on an Indexed Color image, we'd end up with a completely different color! (So Photoshop sensibly prevents us from doing so.)