Ways to Change Selection Outlines
If you don't draw a selection outline correctly the first time, you have two options. You can draw it again from scratch, which is a real bore, or you can change your botched selection outline, which is likely to be the more efficient solution. You can deselect a selection, add to a selection, subtract from a selection, and even select the stuff that's not selected and deselect the stuff that is. (If this sounds like a load of nonsense, keep reading.)
Quick changes
Some methods of adjusting a selection outline are automatic: You choose a command and you're finished. The following list explains how a few commands — all members of the Select menu — work:
Deselect (Ctrl+D or z -D): You can deselect the selected portion of an image in three ways. You can select a different portion of the image; click anywhere in the image window with the rectangular marquee tool, the elliptical marquee tool, or the lasso tool; or choose Select Deselect. Remember, though, when no part of a layer is selected, the entire layer is susceptible to your changes. If you apply a filter, choose a color-correction command, or use a paint tool, you affect every pixel of the layer.
Reselect (Ctrl+Shift+D or z -Shift-D): If you accidentally deselect an image, you can retrieve the most recent selection outline by choosing Select Reselect. It's a great function that operates entirely independently of the Undo command and History palette, and it works even after performing a long string of selection-unrelated operations. (You can restore older selections from the History palette, but that usually means undoing operations along the way.)
Inverse (Ctrl+Shift+I or z -Shift-I): Choose Select Inverse to reverse the selection. Photoshop deselects the portion of the image that was previously selected and selects the portion of the image that was not selected. This way, you can begin a selection by outlining the portion of the image you want to protect, rather than the portion you want to affect. To select the lighthouse in Figure 8-7, for example, it's easier to first select the sky in the red channel and then inverse the selection so that the lighthouse becomes selected.
Tip | You can also access the Inverse and Deselect commands from a shortcut menu in the image window. Right-click (Control-click on the Mac) to make the menu appear underneath your cursor. |
Manually adding and subtracting
Ready for some riddles? When editing a portrait, how do you select both eyes without affecting any other portion of the face? Answer: By drawing one selection and then tacking on a second selection. How do you select a doughnut and leave the hole behind? Answer: Encircle the doughnut with the elliptical marquee tool, and then use the same tool to subtract the center.Photoshop permits you to whittle away at a selection, add pieces on again, whittle away some more, ad infinitum, until you get it exactly right. Short of sheer laziness or frustration, there's no reason why you can't eventually create the selection outline of your dreams:
Adding to a selection outline: To increase the area enclosed in an existing selection outline, Shift-drag with one of the marquee or lasso tools. You also can Shift-click with the magic wand tool or Shift-click with one of the marquee tools when the Fixed Size option is active (as described in the "Geometric selection outlines" section earlier in this chapter).
Subtracting from a selection outline: To take a bite from an existing selection outline, press Alt (Win) or Option (Mac) while using one of the selection tools.
Intersecting one selection outline with another: Another way to subtract from an existing selection outline is to Shift+Alt-drag (Shift-Option-drag on the Mac) around the selection with the rectangular marquee, elliptical marquee, or lasso tool. You also can Shift+Alt-click (Shift-Option-click on the Mac) with the magic wand tool. Shift+Alt-dragging instructs Photoshop to retain only the portion of an existing selection that also falls inside the new selection outline. I frequently use this technique to confine a selection within a rectangular or elliptical border.
If the keypress techniques seem bothersome, use the selection state buttons (labeled in Figure 8-8) at the left end of the Options bar to set your selection tool to the add, subtract, or intersect mode. After clicking a button, simply drag to alter the selection outline. To toggle the tool back to the normal operating mode, click the first button in the bunch. Note that the keyboard techniques described in the preceding list work no matter what button you select in the Options bar. For example, if you click the Intersect button, Alt-dragging (Option-dragging on the Mac) still subtracts from the selection outline.

Figure 8-8: You can use the selection state buttons as well as the Shift and Alt keys (Shift and Option keys on the Mac) when modifying a selection outline.
Tip | When you're working with the magic wand, you can right-click (Control-click on the Mac) to display a shortcut menu that contains the add, subtract, and intersect mode options. Click the mode you want to use. |
Tip | Photoshop displays special cursors to help you keep track of a tool's selection state. Suppose that you select part of an image and the lasso tool is active. When you press Shift or click the Add button in the Options bar, Photoshop appends a little plus sign to the lasso cursor to show you're about to add. A minus sign indicates that you're set to subtract from the selection outline; a multiply sign appears when you work in intersect mode. If you're pressing keys to switch tool modes, Photoshop temporarily selects the corresponding selection state button in the Options bar as well. |
Using Shift and Alt (or Shift and Option) like a pro
The roles of the Shift and Alt keys (or Shift and Option keys on the Mac) in adding, subtracting, and intersecting selection outlines can interfere with your ability to take advantage of other functions of the selection tools. For example, when no portion of an image is selected, you can Shift-drag with the rectangular marquee tool to draw a square. But after a selection is active, Shift-dragging adds a rectangle — not a square — to the selection outline.This is one reason for the selection state buttons in the Options bar. After you click a button, the tool adds, subtracts, or intersects, with no additional keypresses on your part, depending on which button you click. But if you want to hide the Options bar or you just prefer pressing keys to clicking buttons, you can control the selection tools from the keyboard without giving up any selection flexibility.
The trick is to learn when to press Shift and Alt (or Option on the Mac). Sometimes you have to press the key before you begin your drag; other times you must press the key after you begin the drag but before you release. For example, to add a square to a selection outline with the rectangular marquee tool, Shift-drag, release Shift while keeping the mouse button pressed, and press Shift again to snap the rectangle to a square. The same goes for adding a circle with the elliptical marquee tool.The following list introduces you to a few other techniques. They sound pretty elaborate, I admit, but with a little practice, they become second nature (so does tightrope walking, but don't let that worry you). Before you try any of them, be sure to select Normal from the Style pop-up menu in the Options bar.
Note | To keep things simple, the following list is geared toward Windows users. If you use a Macintosh, press Option instead of Alt. |
To subtract a square or a circle from a selection, Alt-drag, release Alt, press Shift, drag until you get it right, release the mouse button, and then release Shift.
To add a rectangle or an ellipse by drawing from the center outward, Shift-drag, release Shift, press Alt, and hold Alt until after you release the mouse button. You can even press the spacebar during the drag to move the marquee around, if you like.
To subtract a marquee drawn from the center outward, Alt-drag, release Alt, press Alt again, and hold the key down until after you release the mouse button.
What about drawing a straight-sided selection with the lasso tool? To add a straight-sided area to an existing selection, Shift-drag with the tool for a short distance. With the mouse button still down, release Shift and press Alt. Then click around as you normally would, while keeping the Alt key down.
To subtract a straight-sided area, Alt-drag with the lasso, release Alt, press Alt again, and click around with the tool.
If you can't manage the last two lasso-tool techniques, switch to the polygonal lasso instead. In fact, the reason Adobe provided the polygonal lasso tool was to accommodate folks who don't want to deal with pressing Alt or Option seven times during a single drag (which I strangely quite enjoy).
Adding and subtracting by command
Photoshop provides several commands under the Select menu that automatically increase or decrease the number of selected pixels in an image according to numerical specifications. The commands in the Select Modify submenu work as follows:
Border: This command selects an area of a specified thickness around the perimeter of the current selection outline and deselects the rest of the selection. For example, to select a 6-point-thick border around the current selection, choose Select Modify Border, enter 6 in the Width option box, and press Enter or Return. But what's the point? After all, if you want to create an outline around a selection, you can accomplish this in fewer steps by choosing Edit Stroke, right? The Border command, however, broadens your range of options. You can apply a special effect to the border, move the border to a new location, or even create a double-outline effect by first applying Select Modify Border and then applying Edit Stroke.
Smooth: This command rounds off the sharp corners and weird anomalies in the outline of a selection. When you choose Select Modify Smooth, the program asks you to enter a Sample Radius value. Photoshop smoothes out corners by drawing little circles around them; the Sample Radius value determines the radius of these circles. Larger values result in smoother corners.
Tip | The Smooth command is especially useful in combination with the magic wand. After you draw one of those weird, scraggly selection outlines with the wand tool, use Select Modify Smooth to smooth out the rough edges. |
Expand and Contract: Both of these commands do exactly what they say, either expanding or contracting the selected area by a specified amount. For example, if you want an elliptical selection to grow by 8 pixels, choose Select Modify Expand, enter 8, and call it a day. These are extremely useful commands; I refer to them several times throughout the book.
Tip | Both Expand and Contract have a flattening effect on a selection. To round things off, apply the Smooth command with a Sample Radius value equal to the number you just entered in the Expand Selection or Contract Selection dialog box. You end up with a pretty vague selection outline, but what do you expect from automated commands? |
In addition to the Expand command, Photoshop provides two other commands — Grow and Similar — that increase the area covered by a selection outline. Both commands resemble the magic wand tool because they measure the range of eligible pixels by way of a Tolerance value. In fact, the commands rely on the same Tolerance value that you set for the magic wand (in the Options bar). So if you want to adjust the impact of either command, you must first select the magic wand and then apply the commands:
Grow: Choose Select Grow to select all pixels that both neighbor an existing selection and resemble the colors included in the selection, in accordance with the Tolerance value. In other words, Select Grow is the command equivalent of the magic wand tool. If you feel constrained because you can click only one pixel at a time with the magic wand tool, you may prefer to select a small group of representative pixels with a marquee tool and then choose Select Grow to initiate the wand's magic.
Similar: Another member of the Select menu, Similar works like Grow, except the pixels needn't be adjacent. When you choose Select Similar, Photoshop selects any pixel that falls within the tolerance range, regardless of the location of the pixel in the foreground image.
Note | Although both Grow and Similar respect the magic wand's Tolerance value, they pay no attention to the other wand options — Contiguous, Use All Layers, and Anti-aliased. Grow always selects only contiguous regions; Similar selects noncontiguous areas. Neither can see beyond the active layer nor produce antialiased selection outlines. |
One of the best applications for the Similar command is to isolate a complicated image set against a consistent background whose colors are significantly lighter or darker than the image. Consider Figure 8-9, which features a light and relatively complex foreground image set against a continuous background of medium brightness values. The following steps explain how to separate this image using the Similar command in combination with a few other techniques I've described thus far.

Figure 8-9: Before choosing Select Similar, select a few sample portions of the background for Photoshop to use as a basis for its selection range.
STEPS: Isolating a Complex Image Set Against a Plain Background
Use the rectangular marquee tool to select some representative portions of the background. In Figure 8-9, I selected the lightest and darkest portions of the background along with some representative shades in between. Remember, you make multiple selections by Shift-dragging with the tool.
Click the magic wand tool icon and enter a Tolerance value in the Options bar. For my image, I entered a Tolerance value of 16, a relatively low value, in keeping with the consistency of the background. If your background is less homogenous, you may want to enter a higher value. Make certain you turn on the Anti-aliased check box.
Choose Select Similar. Photoshop should select the entire background. If Photoshop fails to select all the background, choose Edit Undo and use the rectangular marquee tool to select more portions of the background. You may also want to increase the magic wand's Tolerance value. If Photoshop's selection bleeds into the foreground image, try reducing the Tolerance value.
Choose Select Inverse. Or press Ctrl+Shift+I (z -Shift-I on the Mac). Photoshop selects the foreground image and deselects the background, as shown in Figure 8-10.

Figure 8-10: After selecting the entire background, press Ctrl+Shift+I (z -Shift-I on the Mac) to reverse what's selected and what's not.
Modify the selection as desired. If too few pixels are selected, try choosing the Similar command again. You might also have luck with Select Grow. Or you can modify the selection using Shift and Alt (Option on the Mac).
Congratulations, you've isolated your complex image. Now you can filter your image, colorize it, or perform whatever operation inspired you to select this image in the first place. I wanted to superimpose the image onto a different background, so I copied the image to the Clipboard (Ctrl+C or z -C), opened the desired background image, and then pasted the first image in place (Ctrl+V or z -V). The result, shown in Figure 8-11, still needs some touching up with the paint and edit tools, but it's not half bad for an automated selection process.

Figure 8-11: The completed selection superimposed on a new background.
Note | Whenever you introduce a selection into another image — by copying and pasting or by dragging the selection and dropping it into another image window — Photoshop automatically assigns the selection to a new layer. This is a great safety mechanism because it prevents you from permanently affixing the selection to its new background. But it also limits your file format options when saving an image; you can't save in a format other than the native Photoshop format, PDF, or TIFF without first flattening the image. For the big story on layers, read Chapter 12. |
Softening selection outlines
You can soften a selection in two ways. The first method is antialiasing, introduced in Chapter 5. Antialiasing is an intelligent and automatic softening algorithm that mimics the appearance of edges you'd expect to see in a sharply focused photograph.
Note | Where did the term antialias originate? Anytime you try to fit the digital equivalent of a square peg into a round hole — say, by printing a high-resolution image to a low-resolution printer — the data gets revised during the process. This revised data, called an alias, is frequently inaccurate and undesirable. Antialiasing is the act of revising the data ahead of time, essentially rounding off the square peg so it looks nice as it goes into the hole. According to a reader who spent time at MIT's Architecture Machine Group, "We did the first work with displaying smooth lines. We called the harsh transitions jaggies and the display process dejaggying. Somehow, this easy-to-understand term slid sideways into 'alias' (which it isn't, really, but it's too late to change)." Now you know. |
When you draw an antialiased selection outline in Photoshop, the program calculates the hard-edged selection at twice its actual size. The program then shrinks the selection in half using bicubic interpolation (described in Chapter 2). The result is a crisp image with no visible jagged edges.The second softening method, feathering, is more dramatic. Feathering gradually dissipates the selection outline, giving it a blurry edge. Photoshop accommodates partially selected pixels; feathering fades the selection both inward and outward from the original edge.You can specify the number of pixels affected either before or after drawing a selection. To feather a selection before you draw it with a marquee or lasso tool, enter a value in the Feather option box, found in the Options bar. To feather a selection after drawing it, choose Select Feather or press Ctrl+Alt+D (z -Option-D on the Mac). You also can right-click (Control-click on the Mac) in the image window and then choose Feather from the pop-up menu that appears next to your cursor.The Feather Radius value determines the approximate distance over which Photoshop fades a selection, measured in pixels in both directions from the original selection outline. Figure 8-12 shows the effects of feathering a selection. In the first example, the elliptical window showing the close-up of the young lovers comes from a selection that was antialiased only; no feathering was used. In the second example, before pasting the elliptical selection into the new image, I first feathered the selection, assigning a relatively high Feather Radius value of 24. As you can see, a large feather radius makes a selection fade into view.

Figure 8-12: Two ways of using the elliptical marquee tool to place an inset close-up into an image. The selection in the top image was antialiased and not feathered, and the selection in the bottom image was feathered with a radius of 24 pixels.
The math behind the feather
A few eagle-eyed readers have written to ask me why feathering blurs a selection outline more than the number of pixels stated in the Feather Radius value. A radius of 4 pixels actually affects a total of 20 pixels: 10 inward and 10 outward. The reason revolves around Photoshop's use of a mathematical routine called the Gaussian bell curve, which exaggerates the distance over which the selection outline is blurred.Figure 8-13 demonstrates the math visually. The top-left image shows a hard-edged elliptical selection filled with white against a black background. To its right is a side view of the ellipse, in which black pixels are short and white pixels are tall. (Okay, so it's really a graph, but I didn't want to scare you.) Because no gray pixels are in the ellipse, the side view has sharp vertical walls.

Figure 8-13: Here are some graphic demonstrations of what happens when you feather a selection. Photoshop tapers the ends of the feathered selections to prevent your eye from easily detecting where the feathering starts and stops.
The bottom-left image shows what happens if I first feather the selection with a radius of 24 pixels and then fill it with white. The side view (bottom-right) now graphs a range of gray values, which taper gradually from black to white. See those dark gray areas labeled "2 x Radius"? Those are the pixels that fall into the 48-pixel area measured 24 pixels in and out from the pre-feathered selection outline. These gray areas slope in straight lines.The rounded areas of the side view are the Gaussian bell curves. These are appended to the radius of the feather to ensure smooth transitions between the blurry edges and the selected and deselected pixels. Programs that do not include these extra Gaussian curves end up producing ugly feathered selections that appear to have sharp, incongruous edges.
Tip | If exact space is an issue, you can count on the Feather command affecting about 2.7 times as many pixels as you enter into the Feather Radius option box, both in and out from the selection. That's a total of 5.4 times as many pixels as the radius in all. |
If this was more than you wanted to know, cast it from your mind. Feathering makes the edges of a selection fuzzy — 'nuff said.
Putting feathering to use
You can use feathering to remove an element from an image while leaving the background intact, a process described in the following steps. The image used in these steps, shown in Figure 8-14, is a photo of yours truly (pardon the trousers) and my son Max (third pumpkin from the right) on a recent Allhallows Eve. Although no amount of feathering could fix my pants, I can use it to do a little home remodeling. As you can see in the image, I've notated the three elements I need to remove to turn my home into the impenetrable fortress of solitude that I've always dreamed of.

Figure 8-14: The trick — or treat — is to remove various components from my front door by covering them with selections cloned from other areas.
STEPS: Removing an Element from an Image
Draw a selection around the element using the lasso tool. I'll start with my door handle and lock. The selection needn't be an exact fit; in fact, you want it rather loose, so allow a comfortable buffer zone between the edges of the image and the selection outline.
Drag the selection outline over a patch in the image. Now that you've specified the element you want to remove, you must find a patch — that is, some portion of the image to cover the element in a manner that matches the surroundings. In Figure 8-15, the best match was clearly from the middle section of my door. To select this area, move the selection outline independently of the image merely by dragging it with the lasso tool. (Dragging a selection with a selection tool moves the outline without affecting the pixels.) Make certain you allow some space between the selection outline and the element you're trying to cover.

Figure 8-15: After drawing a loose outline around the lock and handle with the lasso tool, I dragged the outline to select another portion of the door. Then I feathered the selection.
Choose Select Feather. Or press Ctrl+Alt+D (z -Option-D on the Mac). Enter a small value (8 or less) in the Feather Radius option box — just enough to make the edges fuzzy. (I entered 2.) Then press Enter or Return to initiate the operation.
Clone the patch onto the area you want to cover. Select the move tool by pressing V. Then Alt-drag (Option-drag on the Mac) the feathered selection to clone the patch and position it over the element you want to cover, as shown in Figure 8-16. To align the patch correctly, choose Select Hide Extras or press Ctrl+H (z -H on the Mac) to hide the marching ants and then nudge the patch into position with the arrow keys.

Figure 8-16: Next, I used the move tool to Alt-drag (Option-drag on the Mac) the feathered selection over the lock and handle.
Repeat as desired. I used the same technique to eliminate the other undesired elements from the image, selecting from the same area of the door to get rid of the door seam and selecting a bit of the brick wall to wipe out my doorbell. Figure 8-17 shows the details.

Figure 8-17: I used the lasso tool to draw a new outline around the seam and then dragged the outline over another portion of the door. Then I did the same for the doorbell, using the brick wall as a patch.
It's all dj vu from here. After some more feathering, Alt-dragging, and nudging, my mission was complete, as you can see in Figure 8-18. No more points of entry. Nowhere for delivery guys to lodge take-out menus. Not even a doorbell. That'll thwart those pesky trick-or-treaters.

Figure 8-18: The final result. Even the pumpkins are pleased.