Identify Problem Image Areas With the Magic Wand in Photoshop

By Simon Tuckett

Dateline: March 21, 2006
Version: Photoshop CS

More Photoshop tips
Discuss this in the Photoshop forum

Superficially, the Magic Wand tool has a limited faculty for selecting areas of similar color. Selections often have ragged edges and connect parts of an image you never noticed were connected. Yet, it’s this very ability where the strength of the tool lies—it sees what we cannot.

I had always thought of the Magic Wand, rather derisively, as a tool for newbies. It wasn’t until much later that I came to realize its power. As it often happens, it was the result of a job that went to press with a mistake included. I had used a white airbrush to remove the background of an image while protecting the shadow and the product. I must have missed areas because it showed up on the printed piece as regions with a faint dot. Not a glaring error, but certainly annoying and more than a little embarrassing. I now use the following technique with the Magic Wand tool to identify such regions before they become problems.
Download the archive (10MB), extract the vase.psd file and open it. I have already color-balanced and created a path for the image. Your goal is to make the vase image’s background white while protecting its shadow. To load the vase outline path, Command/Ctrl-click it in the Paths palette. Press Command/Ctrl-J to copy the selection to a layer, then add a new layer and position it under the vase.
Make your Foreground Color white. Speaking of eradication of potential mistakes, get into the habit of physically choosing white, whether by clicking white in the Foreground/Background section of the toolbox, choosing it from a swatch, or specifying it in the Color palette. Never assume you have white chosen just because the active color looks white. A 4% white value looks much the same as a 0% value unless the two are adjacent. Select a large 300-pixel airbrush and while avoiding the shadow, paint out the background on the new middle layer. Leave a couple of spots untouched for the purpose of this tutorial.

Now choose the Magic Wand tool (W), set Tolerance to 0 in the Options bar, and check Use All Layers. Uncheck Contiguous so you’ll select the target value anywhere in the file—checking it selects connected pixels only. Click once in the white area close to the vase. If your image resembles what mine did, you’ll have ants marching everywhere. It’s not as clean as you thought! Now Option/ Alt-click the Save selection as channel icon in the Channels palette, and choose Masked Areas in the dialog box. When the alpha channel appears in the Channels palette, turn on the channel’s visibility, deselect your selection, and airbrush all the regions that still need to be white. You won’t see a change in the image as you paint because you are looking at the alpha channel while painting on the RGB channels. The tinted selection region is only a visual guide to the problem areas and even then, it only indicates regions that don’t match the pixel you clicked.
Click in the white region again with the Magic Wand tool, and you are likely to find a tremendous improvement. The background should now be all white. If not, save another alpha channel selection and target the remaining regions with the airbrush.

In the interests of keeping your file size down, once you have a clean selection of the vase and shadow, you can load the selection by choosing Select > Inverse, and Select > Modify > Expand. Set it to 20 pixels, and choose Image > Crop. By expanding your selection a bit, it ensures you’ll crop outside the end of the shadow.

I will often use the Magic Wand to test color matching. First, I fill a rectangular marquee selection with my target color on a new layer in my image. I select the Magic Wand and in the Options bar, I check Use All Layers, uncheck Contiguous, and set Tolerance to 10. I click in my color rectangle to select all the pixels on either side of my target color rectangle. Obviously, the Tolerance varies based on how stringent my color matching requirements are. This technique provides a powerful visual cue as to which regions match the target color.

Don't miss the next Photoshop tip on Get the free newsletter in your mailbox each week. Click here to subscribe.

Simon Tuckett is an illustrator and retoucher in Toronto.