Generating Masks Automatically

In addition to the Quick Mask Mode and selection masking, Photoshop offers several tools that automate the masking process ” or at least, automate some parts of the process. You still need to provide some input to tell the program exactly what you're trying to mask. Three of these tools ” the Magic Eraser, Background Eraser, and Extract command ” employ basic masking theory, but they do it in such a way as to hide the unpleasant details from you, the user . And rather than selecting pixels, these tools delete them. These three tools are given an in-depth workout in the standard edition of the Photoshop CS2 Bible. For this full- color version of the Bible, I'd like to demonstrate Photoshop's other automatic masker , the Color Range command. Color Range generates selection outlines based on the colors inside the image. Sound like the Magic Wand tool to you? Prepare yourself for something much, much better.

Using the Color Range command

Located on the Select menu, the Color Range command generates selections based on color ranges. You use the familiar eyedropper cursor to specify colors that should be considered for selection and colors that you want to rule out. In truth, the Color Range command is a lot like the Magic Wand tool, except that you can select colors with more precision and change the tolerance of the selection on the fly.

When you choose Select Color Range, Photoshop displays the Color Range dialog box shown in Figure 4-13. Like the Magic Wand with the Contiguous option turned off, Color Range selects areas of related color all across the image, whether or not the colors are immediate neighbors. Using the three eyedroppers, click in the image window to select colors, add to a color selection, and subtract from a color selection, just as you do with the Magic Wand ” the difference being that rather than adjusting a Tolerance value before you use the tool, you adjust a Fuzziness option anytime you like. Photoshop dynamically updates the selection according to the new value. The advantage here is pretty obvious.

image from book
Figure 4-13: The Color Range dialog box enables you to generate a mask by dragging with the eyedropper tools and adjusting theFuzziness option.

When you move your cursor outside the Color Range dialog box, it changes to an eyedropper. Use it to click anywhere within your image to specify the color on which you want to base the selection, or click inside the preview, labeled in Figure 4-13. In either case, the preview updates to show the resulting mask.

You can also do the following:

  • Add colors to the selection: To add base colors to the selection, select the Add Color tool inside the Color Range dialog box and click inside the image window or preview. You can access the tool while the standard eyedropper is selected by Shift-clicking (just as you Shift-click with the Magic Wand to add colors to a selection).

    Tip  

    You can Shift-drag with the eyedropper to add multiple colors in a single pass, something you can't do with the magic wand.

  • Remove colors from the selection: To remove base colors from the selection, click with the Remove Color tool or Alt-click (Option-click on the Mac) with the eyedropper. You can also drag or Alt-drag (Option-drag on the Mac) to remove many colors at a time.

    Tip  

    The Undo command works inside the Color Range dialog box as well as out of it. If adding or removing a color sends your selection careening in the wrong direction, simply press Ctrl+Z ( z -Z on the Mac) to correct the mistake.

  • Adjust the Fuzziness value: This option resembles the magic wand's Tolerance value because it determines the range of colors to be selected beyond the ones on which you click. Raise the Fuzziness value to expand the selected area; lower the value to contract the selection. A value of 0 selects the clicked color only. Unlike changes to Tolerance, however, changing the Fuzziness value adjusts the selection on the fly; no repeat clicking is required, as it is with the Magic Wand tool.

    Fuzziness and Tolerance also differ in the kind of selection outlines they generate. Tolerance entirely selects all colors within the specified range and adds anti-aliased edges. If the selection were a mask, most of it would be white with a few gray pixels around the perimeter. By contrast, Fuzziness entirely selects only the colors on which you click and Shift-click, and it partially selects the other colors in the range. That's why most of the mask is expressed in shades of gray. The light grays in the mask represent the most similar colors; the dark grays represent the least similar pixels that still fall within the Fuzziness range. The result is a tapering, gradual selection, much more likely to produce natural results.

  • Reverse the selection: Sometimes it's easier to isolate the area you don't want to select than the area you do want to select. In which case, just select the Invert check box to reverse the selection, changing black to white and white to black.

  • Toggle the preview area: Use the two radio buttons below the preview area to control the preview's contents. If you select the first option, Selection, you see the mask that will be generated when you press Enter or Return. If you select Image, the preview shows the image.

    Tip  

    Press and hold Ctrl (Win) or z (Mac) to toggle between the two previews. You might prefer to leave the option set to Selection and press Ctrl or z when you want to view the image.

  • Preview the selection in the image window: The Selection Preview pop-up menu at the bottom of the dialog box enables you to change what you see in the image window. Leave the option set to None ” the default setting ” to view the image normally in the image window. Select Grayscale to see the mask on its own. Select Quick Mask to see the mask and image together. Select Black Matte or White Matte to see what the selection would look like against a black or white background.

    Although they may sound weird, the Matte options enable you to get an accurate picture of how the selected image will mesh with a different background. Figure 4-14 shows an original image at the top left with the grayscale mask on the right. The two additional Matte views help you see how this particular selection looks against two backgrounds as different as night and day. Use the Fuzziness option in combination with Black Matte or White Matte to come up with a softness setting that will ensure a smooth transition.

    image from book
    Figure 4-14: The options in the Selection Preview pop-up menu change the way the Color Range command previews the selection in the image window.

  • Select by predefined colors: Choose an option from the Select pop-up menu at the top of the dialog box to specify the means of selecting a base color. If you choose any option besides Sampled Colors, the Fuzziness option and eye- dropper tools become dimmed to show they are no longer operable. Instead, Photoshop selects colors based on their relationship to a predefined color. For example, if you select Red, the program entirely selects red and partially selects other colors based on the amount of red they contain. Colors composed exclusively of blue and green are not selected.

    The most useful option in this pop-up menu is Out of Gamut, which selects all the colors in an RGB or Lab image that fall outside the CMYK color space. You can use this option to select and modify the out-of- gamut colors before converting an image to CMYK.

  • Load and save settings: Click the Save button to save the current settings to disk. Click Load to open a saved settings file. To use a settings file on a PC, it must end in the extension .axt .

After you define the mask to your satisfaction, click OK or press Enter or Return to generate the selection outline. Although the Color Range command is more flexible than the Magic Wand, you can no more expect it to generate perfect selections than any other automated tool. After Photoshop draws the selection outline, therefore, you'll probably want to switch to Quick Mask Mode and paint and edit the mask to taste.

If you learn nothing else about the Color Range dialog box, at least learn to use the Fuzziness option and the eyedropper tools. Basically, you can approach these options in two ways. If you want to create a diffused selection with gradual edges, set the Fuzziness option to a high value ” 60 or more ” and click and Shift-click two or three times with the eyedropper. To create a more precise selection, enter a Fuzziness of 40 or lower and Shift-drag and Alt-drag (Option-drag on the Mac) with the eyedropper until you get the exact colors you want.

A few helpful Color Range hints

To help you make better use of the Color Range dialog box, check out these hints, based on experience with this feature's strengths and weaknesses. You'll no doubt come up with some do's and don'ts of your own, but this list will get you started:

  • Limit the Portions of an Image: You can limit the portion of an image that Select Color Range affects by selecting part of the image before choosing the command. When a selection exists, the Color Range command masks only those pixels that fall inside it. Even the preview area reflects your selection.

  • Add or Subtract from your selection: You also can add or subtract from an existing selection using the Color Range command. Press Shift when choosing Select Color Range to add to a selection. Press Alt (Win) or Option (Mac) when choosing Color Range to subtract from a selection.

  • When you need to start over: If you get hopelessly lost when creating your selection and you can't figure out what to select and what to deselect, click with the Eyedropper tool to start over. This clears all the colors from the selection except the one you click. Or you can press Alt (Option on the Mac) to change the Cancel button to a Reset button, which returns the settings inside the dialog box to those in force when you first chose Select Color Range.



Photoshop CS2 Bible
Photoshop CS2 Bible
ISBN: 0764589725
EAN: 2147483647
Year: 2003
Pages: 95

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net