The "magic wand" tool ("blurred" selection) allows you to create a selection based on areas of an image or the current layer with similar color values.
When using the magic wand, it is particularly important to choose the right starting point. Otherwise, you can easily receive something completely different (possibly even exactly the opposite) than desired.
The magic wand is very well suited to create a selection from parts of the image which are separated from their surroundings by strong edges. It is fun to use the magic wand, therefore especially GIMP beginners work with it a lot. If you have used the magic wand for a while, however, it may happen that you find it rather difficult to use it to select exactly the area you want – neither more nor less. More experienced users therefore find working with the Path or Select by Color tools much more efficient and use the magic wand much less frequently. Nevertheless, the magic wand is very useful when it comes to selecting an area of the image that is limited by a contour. It also works very well to select a (nearly) monochrome background.
Please note that the selected area includes not only pixels directly connected to the starting point. The Magic Wand is also able to skip small gaps. The size of these gaps can be adjusted with the Threshold property. To increase or decrease the threshold value when using the Magic Wand, after the first mouse click, drag the mouse pointer down or right, or up or left, respectively.
2.5.1. Tool call
You have several ways to activate the "Magic Wand" tool:
– Via the Tools → Selection Tools → Magic Wand menu in the image window,
– with a mouse click on the icon
In the tool window,
– via the keyboard shortcut U.
2.5.2. Additional keys (presets)
The Magic Wand has no special keyboard shortcuts. The general keyboard shortcuts for selection tools are available, however.
2.5.3. Using the tool
Figure 14.22. Use the magic wand: The selected pixels are contiguous
A selection is created as soon as you click on an area of the image. It enlarges starting from the point you selected, as if you were pouring water that runs over all the areas with the same or similar color of the starting pixel. You can influence the similarity threshold by dragging the mouse: The further you drag the mouse down or to the right, the larger the selected area becomes. In the same way, by dragging upwards or to the left, you can reduce the size of the selected area.
You can change the outline of the selection via Alt + Move arrow keys.
Figure 14.23. Properties of the Magic Wand tool
Normally, the current settings of a tool are displayed below the toolbox as soon as you activate a tool. If this is not the case, you can activate it at any time by choosing Window → Dockable Dialogs → Tool Settings in the Image Window.
Please refer to Selection tools if you need help with the general properties of the selection tools.
General selection properties.
These properties affect the way the Magic Wand creates the selection starting from the starting point.
If you activate this property, the Magic Wand can also be used to select transparent areas. Otherwise, transparent areas cannot be selected with the Magic Wand tool.
This property becomes important when the image has multiple layers and the active layer is either semi-transparent or has a mode other than Normal. In such a case the colors in the active layer differ from those of the whole image. When the Check Association property is off, the Magic Wand reacts only to the colors in the active layer. If it is on, the colors of all visible layers are included in the creation of the selection. For more information see Sample Merged .
If switched on, the tool also considers diagonally adjacent pixels as contiguous when creating a selection. In other words, it looks not only at the four perpendicular neighbors of a pixel, but at all eight pixels.
Figure 14.24. Example of diagonal neighbors
A pixel with 4 perpendicular neighbors
One pixel with 4 diagonal neighbors
A pixel with 8 neighbors
Figure 14.25. Example of using the Diagonal Neighbors property
"Diagonal neighbors" switched off
"Diagonal neighbors" switched on
This slider controls the sensitivity of the wand at the time you click on the start point: The higher the threshold, the greater the choice. After the first mouse click, you can drag the mouse pointer down or to the right to increase the threshold and up or to the left to decrease it. Thus, you can increase the same results regardless of the threshold setting. However, you may have to pull less to get the desired result.
With this property you determine which component of the image is used by GIMP to calculate the similarity.
The components available for selection here include Red, Green, Blue, Hue, Saturation and Value.
This property is only an aid to selection. Selections marked with "marching ants" may not be recognizable if you use the "Free selection" or "Magic wand" tools. If this property is switched on, selected areas are filled with a magenta color as long as you hold down the left mouse button. As soon as you release the mouse button, the mask disappears.
Figure 14.26. Example for the use of the "Draw mask" property
Wand selection without "Draw mask
Magic wand selection with "Draw mask. The left mouse button has not yet been released.