Selections based on shape are probably the easiest ones to make. Whether the object you need to grab is rectangular, elliptical, or rectangular with rounded corners, Photoshop has just the tool for you. You'll use the first couple of tools described in this section often, so think of them as your bread and butter when it comes to making selections.
Photoshop's most basic selection tools are the Rectangular and Elliptical Marquees. Anytime you need to make a selection that's squarish or roundish, reach for these little helpers, which live at the top of the Tools panel, as shown in Figure 4-2.
Figure 4-2. You'll spend loads of time making selections with the Rectangular and Elliptical Marquee tools. To summon this pop-up menu, click the second item from the top of the Tools panel and hold down your mouse button until the menu appears.
To make a selection with either marquee tool, just grab the tool by clicking its icon in the Tools panel or by pressing M and then mouse over to your document. When your cursor turns into a tiny + sign, drag across the area you want to select (you'll see the marching ants appear as soon as you start to drag). Photoshop starts the selection where you clicked and continues it in the direction you drag as long as you hold down the mouse button. When you've got marching ants around the area you want to select, release the mouse button.
You can use a variety of tools and techniques to modify your selection, most of which you can find in the Options bar (Figure 4-3). For example, you can:
Move the selection. Click anywhere within the selected area and drag to another part of your document (your cursor turns into a tiny arrow) to move the selection where you want it.
Add to the selection. When you click the "Add to selection" button in the Options bar (see Figure 4-3) or press and hold the Shift key, Photoshop puts a tiny + sign beneath your cursor to let you know it'll add whatever you select to your current selection. This mode is handy when you've selected most of what you want but notice that you missed a spot. Instead of starting over, you can switch to this mode and draw around that area as if you were creating a new selection. You can also use this mode to select areas that don't touch each other, like the irises in your dog's eyes (see Fixing Animal White Eye).
Figure 4-3. Using the buttons in the Options bar, you can add to or subtract from a selection, as well as create a selection from two intersecting areas. Since all selections begin at the point where you first click, you can easily select one of these doors by dragging diagonally from the top-left corner to the bottom right as shown here. You can tell from the tiny + sign next to the crosshair-shaped cursor that you're in "Add to selection" mode, so this figure now has two selections: the blue door and the red door.
Subtract from the selection. Clicking the Options bar's "Subtract from selection" button (also shown in Figure 4-3) or pressing and holding the Option key (Alt on a PC) has the opposite effect. You see a tiny – sign beneath your cursor to let you know you're in this mode. Mouse over to your document and draw a box (or oval) around the area you want to deselect.
Intersect one selection with another. If you click the "Intersect with selection" button after you draw a selection, Photoshop lets you draw another selection that overlaps the first; the marching ants then surround only the area where the two selections overlap. It's a little confusing, but don't worry because you'll rarely use this mode (if at all). The keyboard shortcut is Shift-Option (Shift+Alt on a PC). Photoshop puts a tiny multiplication sign (x) beneath your cursor when you use this mode.
Feather. If you want to soften the edges of your selection so that it blends into the background or another image, use feathering. You can enter a value in pixels in this field before you create the selection. As you'll learn later in this chapter, feathering a selection lets you gently fade one image into another. See the box on The Softer Side of Selections for more on feathering.
Anti-alias. Turn on the Anti-alias checkbox to make Photoshop smooth the color transition between the pixels around the edges of your selection and the pixels in the background. Like feathering, anti-aliasing softens your selection's edges slightly so that they blend better, though you can't control the amount of softening Photoshop applies. It's a good idea to leave this checkbox turned on unless you want your selection to have super crisp—and possibly jagged and blocky—edges.
Style. If you want to constrain your selection to a fixed size or aspect ratio (so that the relationship between its width and height stays the same), you can select Fixed Width or Fixed Ratio from the Style pop-up menu and then enter the size you want in the resulting width and height fields. (Be sure to enter a unit of measurement into each field, such as px for pixels.) If you leave the Normal option selected, you can draw any size selection you want.
Here's how to select two doors in the same photo, as shown in Figure 4-3:
Click the marquee tool icon in the Tools panel and choose the Rectangular Marquee from the pop-up menu (shown in Figure 4-2).
The Tools panel remembers which marquee tool you last used, so you'll see that tool's icon on top of the selection tools pop-up menu. If that's the one you want to use, just press M to activate it. If not, in the Tools panel, click and hold whichever marquee tool is showing until the pop-up menu appears and then choose the tool you want.
Tip
To cycle between the Rectangular and Elliptical Marquee tools, press M to activate the marquee toolset and then press Shift-M to activate each one in turn. If that doesn't work, make sure that a gremlin hasn't turned off the preference that makes this trick possible. Choose Photoshop→Preferences→General (Edit→Preferences→General on a PC) and make sure the "Use Shift Key for Tool Switch" checkbox is turned on.
Drag to draw a box around the first door.
To select the blue door shown in Figure 4-3, click its top-left corner and drag diagonally toward its bottom-right corner. When you get the whole door in your selection, release the mouse button. Don't worry if you don't get the selection in exactly the right spot; you can move it around in the next step.
Move your selection into place if necessary.
If you need to move the selection, just click inside the selected area (your cursor turns into a tiny arrow) and drag the selection box where you want it. You can also use the arrows on your keyboard to nudge the selection in one direction or another (you don't need to click it first).
Press the "Add to selection" button in the Options bar and then select the second door by drawing a selection around it.
Photoshop lets you know that you're in "Add to selection" mode by placing a tiny + sign beneath your cursor. Once you see it, mouse over to the second door and drag diagonally from its top-left corner to its bottom right, as shown in Figure 4-3.
If you need to move this second selection around, do that before you release the mouse button or you'll end up moving both selections instead of just one. To move a selection while you're drawing it, hold down your mouse button, press and hold the space bar, and then move your mouse to move the selection. When you've got the selection in the right place, release the space bar—but keep holding the mouse button—and continue dragging to draw the selection. This maneuver feels a bit awkward at first, but you'll get used to it with practice.
Congratulations! You've just made your first selection and added to it. Way to go!
Tip
To draw a perfectly square or circular selection, press and hold the Shift key as you drag with the Rectangular or Elliptical Marquee tool, respectively. If you want to draw the selection from the center outward (instead of from corner to corner), press and hold the Option key (Alt on a PC). If you want to draw a perfectly square or circular selection from the center outward, press and hold Shift-Option (Shift+Alt) as you drag with either tool. Whew—that's a lot of keys! Be sure to use this trick only on new selections—if you've already got a selection, the Shift key pops you into "Add to selection" mode.
The Elliptical Marquee tool works just like the Rectangular Marquee tool except that it draws round or oval selections. It's the perfect tool for selecting eyes, circling yourself in a group photo (Stroking (Outlining) a Selection), or creating the ever-popular, oh-so-romantic, soft oval vignette shown in Figure 4-4.
Figure 4-4. By feathering a selection you've made with the Elliptical Marquee tool and adding a layer mask (page 113), you can create a quick two-photo collage like this one. Wedding photographers and moms—not to mention armadillo fans—love this kind of thing! If you forget to feather your selection before you add a layer mask, not to worry: you can always use the Masks panel (page 120) to do it after the fact. Just click to select the mask thumbnail and then choose Window→Masks. When the Masks panel opens, drag the Feather slider slightly to the right to give it a soft edge. Once you get the hang of this technique, try creating it using the Ellipse Shape tool set to draw in path mode instead, as described in the section on shape tools later in this chapter. It's a little bit quicker and slightly more efficient!
Here's how to create a soft oval vignette:
Open two images and combine them into one document.
Simply drag one image from its Layers panel into the other document's window, as shown on Managing Layers.
Reposition the layers so the soon-to-be-vignetted photo is at the top of the Layers panel.
Over in the Layers panel, make sure that both layers are editable so you can change their stacking order. If you see a tiny padlock to the right of either layer's name, double-click that layer in the Layers panel to make it editable. Then drag the layer containing the photo you want to vignette (in Figure 4-4, that's the picture of the armadillo) to the top of the Layers panel.
Grab the Elliptical Marquee tool and select the part of the image you want to vignette (here, the armadillo's head).
Peek at your Layers panel to make sure the correct photo layer is selected (the armadillo) and position your mouse near the center of the image. Press and hold the Option key (Alt on a PC), mouse over to the image, and drag to draw an oval-shaped selection from the inside out. When you've got the selection big enough, release the Option (or Alt) key and your mouse button.
Feather the selection's edges by clicking the Refine Edge button in the Options bar.
In the resulting dialog box, make sure all the sliders are set to 0 and then drag the Feather slider to the right. If you want to see what the feathered edge will look like, release your mouse button and take a peek at your document—you'll see the newly softened edge against a temporary white background. If you want to preview the feather against a different background, click any of the other preview buttons toward the bottom of the dialog box. (Creating Selections with Channels covers the Refine Edge dialog box in greater detail.) When it looks good, click OK to close the dialog box.
Hide the area outside the selection with a layer mask.
You could simply inverse the selection (The Color Range Command) and then press the Delete key (Backspace on a PC) to zap the area outside the selection, but that'd be mighty reckless. What if you changed your mind? You'd have to undo several steps or—curses—start over completely! A less destructive and more flexible approach, which you learned about back on Layer Masks: Digital Masking Tape, is to hide the area outside the selection with a layer mask. Over in the Layers panel, make sure you have the correct layer selected (in this case, the armadillo) and then add a layer mask by clicking the tiny circle-within-a-square icon at the bottom of the Layers panel (you can also use the Mask panel's Feather slider to soften the mask's edge, if you happened to skip the previous step of feathering the selection). Photoshop hides everything outside the selection area, letting you see through to the bluebonnet layer below. Beautiful!
That armadillo looks right at home, doesn't he? You'll want to memorize these steps because this method is perhaps the easiest—and most romantic!—way to combine two images into a new and unique piece of art (although starting on The Vector Shape Tools you'll learn how to use the vector Shape tools to do the same thing).
The Marquee toolset also contains the Single Row Marquee and Single Column Marquee tools, which can select exactly one row or one column's worth of pixels, spanning either the width or the height of your document. You don't need to drag with your mouse to create a selection with these tools; just click once in your document and the marching ants appear.
Now, you may be asking, "When would I want to do that?" Not often, it's true, but consider these circumstances:
Mocking up a web page design. If you need to simulate a column or row of space between certain areas in a web page, you can use either tool to create a selection that you fill with the website's background color, or you can just delete the existing pixels by pressing the Delete key (Backspace on a PC).
Stretching an image to fill a space. If you're designing a web page, for example, you can use these tools to extend the image by a pixel or two. Use either tool to select a row of pixels at the bottom or side of the image, grab the Move tool by pressing V, and tap the arrow keys on your keyboard while holding the Option key (Alt on a PC) to nudge the selection in the direction you need and duplicate it at the same time. However, a better option might be to use Content-Aware Scale (see The Content-Aware Scale Tool).
Making an image look like it's melting or traveling through space at warp speed. You can use either tool to create a selection and then stretch it with the Free Transform tool (see Figure 4-5).
Figure 4-5. To achieve the melting strawberry look shown here, start by using the Single Row Marquee to select a row of pixels. Then "jump" the selection onto its own layer by pressing ⌘-J (Ctrl+J on a PC). Next, summon the Free Transform tool by pressing ⌘-T (Ctrl+T), and drag one of the square, white center handles downward. Unfortunately you can't get to the Single Row and Single Column Marquee tools with a keyboard shortcut; you've got to activate them in the Tools panel instead.
Okay, technically, vector shapes aren't selection tools at all, but you can use them to create selections (turn to Drawing with the Shape Tools to learn more about vector shapes). Once you get the hang of using them (as this section shows you) you'll be reaching for 'em all the time.
Perhaps the most useful of this bunch is the Rounded Rectangle tool. If you ever need to select an area that's rectangular but has rounded corners, the Rounded Rectangle tool is your best bet. If you're creating an ad for a digital camera, say, you can use this technique in a product shot to swap the image shown on the camera's display screen with a different image. Or more practically, you can use it to give your photos rounded corners, as shown in Figure 4-6.
Figure 4-6. If you're tired of boring, straight corners on your images, use the Rounded Rectangle tool to produce smooth corners like the ones shown here.
Here's how to round the corners of your photos:
Open a photo and double-click the Background layer to make it editable.
Because you'll add a mask to the photo layer in step 6, you need to make sure the Background layer is unlocked or Photoshop won't let you add the mask.
Select the Rounded Rectangle tool from the Tools panel.
Near the bottom of the Tools panel is the Vector Shape toolset. Unless you've previously selected a different tool, you'll see the Rectangle tool's icon. Click the icon and hold down your mouse button until the pop-up menu appears and then choose the Rounded Rectangle tool.
In the Options bar, click the Paths mode button and change the Radius field to 40 pixels.
As you'll learn on Drawing with the Shape Tools, the vector Shape tools can operate in various modes, which you set in the Options bar. For this particular technique, you need to make sure that the Rounded Rectangle tool is in Paths mode (the button looks like a square with a tiny dot on each corner with a pen in the center). Next, change the number in the Options bar's Radius field, which controls how rounded the image's corners will be: the lower the number, the less rounded; the higher the number, the more rounded. This field was set to 40 pixels to create the corners shown in Figure 4-6.
Draw a box around the image.
Mouse over to your image and, starting in one corner, drag diagonally to draw a box around it. When you let go of the mouse button, Photoshop creates a thin gray line that appears atop your image called a path (you'll learn more about paths in Chapter 13). If you need to move the box, while you're drawing it, press and hold the space bar. If you want to move it after you've drawn it, press A to grab the Path Selection tool (it looks like a black arrow and lives below the Type tool in the Tools panel), click the path to select it, and then drag to move it wherever you want.
Hide the area outside the path by adding a layer mask.
Over in the Layers panel, click the photo layer once to select it and then add a vector layer mask by ⌘-clicking (Ctrl-clicking) the tiny circle-within-a-square icon at the bottom of the Layers panel. Photoshop hides the old, boring square photo edges. Why a vector mask, you ask? Because the path you drew with the Shape tool is vector in nature, not pixel-based. As you learned on Opening an Existing Document, you can resize a vector without losing quality anytime you want by selecting it and using Free Transform (The Transformers). Sweet! For more on vector masks, skip ahead to Using Vector Masks.
Who knew that giving your photo rounded corners was so simple?
Get Photoshop CS5: The Missing Manual now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.