Other Days with Earl is a continuing series of How to Do It articles that I post whenever I have a special topic to show you. They are usually longer articles. There have been 18 previous episodes. You can see what the topics are by clicking on the Menu item ODWEarl above.
Sometimes the Magic Wand Tool can be just the tool to use to make your selection. But, it doesn't always seem to work the way you expected it to work. The more you know about how this tool works the more likely it will do what you expected it to do. Let me tell you a little about what I know about how it works.
The Magic wand Tool selects regions of luminance and/or color by virtue of the fact that it calculates selections in the different color channels. So if you want to select a region of color or luminance (intensity) inside Photoshop the Magic Wand Tool is a great place to start.
Before we begin, let's make sure that we are starting at the same point. In the Tool Bar, make sure you have the Magic Wand Tool selected. The Quick Selection Tool and the Magic Wand Tool are both there. Click on the fourth tool down and select the Magic Wand Tool.
When the Magic Wand Tool is selected, the Options Bar contains items associated with the Magic Wand. The first thing to do is right-click on the Tool Preset Picker box at the far left of the Options Bar and select Reset Tool, NOT Reset all tools.
The first thing you see to the right of the Preset Picker is a group of four buttons with the first button shaded showing that it is selected. This button is for the Magic Wand to make a new selection. Which is what we want when we first select the tool.
The next item in the Options Bar is Tolerance. The default value is 32. Since we reset the tool at the beginning, we have the default values.
Let's consider what the Tolerance value does. Consider the following image. I have on the background layer two identical black to white gradients separated by a yellow bar. There is another layer above that with two yellow bars on it, but the visibility is turned off for that layer. The background layer is selected.
The Tolerance value controls how far Photoshop expands your selection in luminance values from where you click on the image. Now, luminance values range from 0 for black to 255 for white. Therefore there are 256 luminance levels on a channel by channel basis inside a standard 8-bit per channel image. And, these are normally the kind of photos we use. So, each of our RGB channels have 256 luminance levels.
If I now click near the center of the upper black to white gradient with the Magic Wand tool, and the Tolerance = 32, which is the default setting, Photoshop gives me a selection that is 32 luminance values lighter than where I clicked, and 32 luminance values darker than where I clicked. Photoshop does that on a channel by channel basis and then averages the values and gives you the selection based on that. Here we are looking at a black to white gradient so we don't have any variation in the different color channels.
Now, if we want to change the size of the selection, we change the Tolerance value in the Options Bar. Let's use a larger Tolerance value and change it to 90. I enter 90 in Tolerance. Now, I can either deselect the selection or just leave it there. Since the New Selection button in the Options Bar is still selected, when I click outside the current selection, Photoshop gives me a new selection. I clicked near the left side of the gradient and now I have a selection that is 90 luminance values lighter than where I clicked and as many of the 90 luminance values darker as it can since the darkest edge is fairly close to where I clicked.
Let's decrease the Tolerance value to 15. Then I click the Magic Wand Tool near the right hand side of the black to white gradient. I now get a selection that goes from 15 values darker and 15 values lighter than where I clicked.
We see that if we increase the Tolerance value we get a larger selection. If we decrease the Tolerance value we get a smaller selection.
The next item in the Options Bar is Anti-alias which tries to smooth out the perimeter of the selection. But anti-aliasing of the Magic Wand selection is not very successful in smoothing the edges. It is just that anti-aliasing doesn't work very well with the Magic Wand because of the way Photoshop determines where the edge of the selection should be.
To show you an example of how jagged the edge can be, in the example where I used a Tolerance =32 and clicked near the middle of the upper gradient, I used Command / Control - J to copy the selection to its own layer. I turned off the visibility of the background layer so only the selection of the gradient was visible. Then I zoomed in to 300%. Look how jagged the edge is!
Now the next item in the Options Bar is Contiguous. We could also use the term Adjacent instead of Contiguous. What it does is select pixels that are adjacent to one another. For example, in this image where I have selected with the Magic Wand, with Tolerance=50, in the bottom gradient, the selection does not jump the gap between the two gradients caused by the yellow bar. The selection is 50 values lighter and 50 values darker from where I clicked and only in the bottom gradient.
Now if I turn off Contiguous by clicking on its check mark to turn it off, and then click in the upper gradient near the left side of the image, we see that the selection is in both the upper and lower gradients....it has jumped the gap to include all on this layer that is 50 values lighter and 50 values darker than where I clicked in the upper gradient. The pixels no longer need to be adjacent to one another.
Now the next item in the Magic Wand Options Bar is Sample All Layers. And notice that I have both Contiguous and Sample All Layers turned off.
Now I will turn on the visibility of the layer with the two yellow bars. And, I leave both Contiguous and Sample All Layers off. And, the background layer is still the active layer. Tolerance is still 50. Then I click the Magic Wand in the gradient area between the two upper yellow bars.
What is now selected is 50 values lighter and darker than where I clicked on the gradient area. But the selection includes the area of the upper and lower yellow bars between the gradient areas. And the selection excludes the region over the middle yellow bar. This is because the background layer is the active layer and Sample All Layers is off. Thus, the wand is sampling what is on background layer as if the upper and lower yellow bars were not there.
Now, if I turn Sample All Layers on, keep the background layer still the active layer, and click in the same spot in the gradient area as in above, Then I get this selection. Since the Magic Wand is looking at all layers that you see, a composite of all the layers,we get the four selection areas that are between the yellow bars and 50 values lighter and darker than where I clicked on the gradient.
But, what happens if I have Tolerance=50, Contiguous off, Sample All Layers off, and the layer with the two yellow bars the active layer, and I click with the Magic Wand in the same place as before in the gradient? Everything but the two yellow bars are selected. This is because the wand is sampling what is where it clicked on the two yellow bars layer.
And, that area is transparent, that is, there is nothing there. So everything that is transparent is within the 50 values of the Tolerance value = 50. You can see that if I turn off the visibility of the background layer. the only thing not selected are the two yellow bars on this layer.
It is important to remember that the selection in Photoshop only affects one active layer sat a time. That is to say, if you have made a selection and you went to use that selection then you have to be on the layer on which you want to use it.
A very good use for the Magic Wand Tool is to select a region of solid color. Let's look are what we had before. I have open the .psd document with the two layers in it....the background layer is the layer with the two identical black to white gradients separated by a yellow bar....and the layer with the two yellow bars. And, I have reset the tool to the default values.
I want to select only the top yellow bar of the image without any jagged edges. In the image above, you may notice that I have the layer with the two bars on it the active layer....this is the layer I want active since I want to select a bar that is on that layer. With that layer the active layer, i can leave the default Sample All Layers Off. I want the default Contiguous left ON. And, I want Anti-alias OFF so that Photoshop won't try to smooth the edges and give me a jagged edge. And, I want to change the Tolerance = 0. With the Tolerance = 0, the Magic Wand will make the selection 0 values lighter and 0 values darker. Since 0 values lighter and darker means only the value where you click will be selected. Hence the selection will be just like it had been made with the Rectangular Marquee Tool.
This is basically how the Magic Wand works. And, this is just about all that I want to say for this episode of Other Days with Earl. However....let me show you two more things that comes to my mind.
Here I have a document with many layers of solid color rectangles. Each layer has one solid color rectangle on it. I want to select, with the Magic Wand Tool, the various colors. Since I know that I want to select regions of solid color, I know that I want Tolerance = 0. I want Anti-alias OFF. I want Contiguous ON. And, For this example, I will have Sample All Layers OFF. I have my Layer 5 the active layer. I click in a visible part of Layer 5. The selection is that of the whole rectangle of Layer 5 even though we do not see a part of Layer 5.
If I leave all the other settings the same and change Sample All Layers to On, and then click on the same place as before and Layer 5 is still active, I get just the region selected being that which I see of Layer 5, not the entire rectangle.
So.........think about what you are trying to select and set your Magic Wand Tool Options the values you need them to be to get what you want.
Here is the other item I wanted to point out. Remember the Selection Options in the Magic Wand Options Bar?
Generally, we have been using only the first option, A, New Selection. B adds to the selection, C subtracts from the selection, and D gives the intersection with the selection. Here is a brief video showing these Selection Options.
addAndSubtractFromSelection from Earl Kreins on Vimeo.
Here are some general guidelines:
• To increase the size of the selection region, increase Tolerance.
• To decrease the size of the selection region, decrease Tolerance.
• Anti-alias On will give you jagged edges.
• To make a selection of a solid color
Make layer with the item on it the active layer.
Tolerance = 0
Sample all Layers OFF
There is more to know about the Magic Wand Tool, but this should give you an idea of what could be happening if the tool is not doing what you expect.
Hope this was helpful to you.
Please give me some feedback on what you thought about this Episode of Other Days with Earl. If you have something that you are interested in let me know. Maybe I can help.