Home  >  Tutorials  >   PSP 9 Tutorials  >
Learning PSP 9, Lesson 08:  >
Tools: The Magic Wand Tool
E-mail this tutorial to a friend Email to a Friend

Tools:
The Magic Wand Tool
Created by: Prof

 
This series of tutorials is oriented toward helping those new users of PSP 9 to learn the basics of this great graphic program. The tutorials are written to introduce the basic features, tools and palettes and build upon one another. Also, the tutorials may be used as a reference for using particular tools, palettes and features of PSP.
 

The Selection Tools: The Magic Wand Tool

In the previous two tutorials on Selection Tools we overviewed the Tool Options palette for the Selection tool, the Selections menu and the Freehand Selection tool. If you have not read these tutorials yet please use them as a reference for using the Tool Options palette and the Selections menu.

Purpose and Goal of this Tutorial:

In this tutorial we will be reviewing the Magic Wand tool and its various options for creating selections. The Magic Wand works on many pictures and graphics but not all, as it does in many ways depend upon the complexity or simplicity of the colors.

  • The Magic Wand and its Options
  • The Selections Menu and its Items of Select All, Float and Defloat
  • Some Examples
 

The Magic Wand

The Magic Wand is a tool used to select an area or object in a photograph or graphic. Its ease of use is dependent upon the complexity of colors in the area to be selected. The Magic Wand is used often to isolate an object (such as a person) in a photo, or the background area of the photo.

Its options are similar to other selection tools with some additions that make this tool quite versatile. It has the same three modes (Replace, Add [Shift], and Remove [Ctrl]), and Anti-alias. In addition it has the option of Match Mode (None, RGB Value, Color, Hue, Brightness, All Opaque and Opacity) which determine how the colors are selected, and it has a way to pick up the colors from a lower layer (Sample Merged) and to pick up either contiguous pixels or all pixels of the Match Mode used.

Basically, dependent upon the Match Mode, the Magic Wand works by selecting pixels similar to the one under the Magic Wand's point of contact on the canvas. However, by using its options, one can pick up greater areas on the canvas.

 



New Image     Selection Tool     Flood Fill Tool

Magic Wand Tool  Reset to Default




Note

A Basic Example of the Magic Wand

Create a new image, 300 x 300 Pixels, 16 Million Colors, white Background.

With the Selection tool (Selection Type = Circle, Anti-alias = checked), draw a circle selection in the middle of the canvas.

Flood-fill the selection with a solid color (I used Blue) and deselect (Selections || Select None or Ctrl+D).

Click on the Magic Wand tool. In the Presets drop-down dialog, set all values to default.

First, click on the white area and flood-fill the selection with a different solid color (I used Purple).

Now click on the center circle color with the Magic Wand.

Note: When you first clicked on the white area, the selection was outside of the blue circle and then when you clicked on the blue circle, the selection was just around the blue.

Note: When working with either a large transparent area or solid color, the Magic Wand will easily create the selection around the object.

 

New Image     Materials Palette - Materials Box  Materials Gradient Option

Flood Fill Tool     Selection Tool

Exploring The Magic Wand's Options

To begin exploring the Magic Wand's options let's first create a more complex background behind a circle:

Create a new image with the same settings as before (just press the Shift key when clicking on the menu item or on the New Image button).

Set your Foreground Material to Gradient:
– Gradient = Duotone red
– Angle = 0
– Repeats = 7
– Invert = unchecked
– Style = Radial
– Center Points = both 50

Flood-fill your image with this gradient.

With the Selection tool, draw a circle selection in the center of the canvas, flood-fill this selection with pure Red (Red = 256, Green = 0, Blue = 0; #FF0000) and deselect (Ctrl+D).

 

Contiguous Checked

Let's say we want to create a selection that surrounds the circle but keeps the circle intact. If there were a solid color as a background using the Magic Wand at its default settings would work. However on this background when you click on an area, only a small portion of the area is selected.

Note that in this illustration, clicking on a dark red area such as that in the corners, only one corner gets a selection. Also note that the default settings include the 'Contiguous' box is checked. This means that only pixels contiguous to the selected area will be selected if they fall within the hue and tolerance levels.

 

Contiguous Unchecked

In this example, with the 'Contiguous' option unchecked, we find that all four corners are selected. Thus, when Contiguous is not checked all pixels that fall within the selected area that meet its hue and tolerance will be selected.

 

Add with Contiguous Unchecked

Keeping Contiguous unchecked and setting the Mode to 'Add' one can continue to select areas of the background as illustrated in the graphic to the left. Although not shown as an illustration by continuing to select areas of the background with these options one can eventually get a completed selection of the background.

Then, one can manipulate the graphic. One might want to invert the selection, then promote the selection (then of the circle) to a layer, and then create a new background, or enhance the circle and the background which are on separate layers. Although there are other ways as well to enhance the image, just experiment as you desire to see what you can achieve just with these simple options with the Magic Wand.

 

The Tolerance Option

The 'Tolerance' option allows the contiguous pixels to vary by the Tolerance value from the selected area. In this fashion, one can get a larger area selected. In the case for the illustration to the left I set the Tolerance = 68, kept Contiguous unchecked and was able to obtain a complete selection of the background. However, it took me a little time playing with the Tolerance values as well as finding a spot on the background that worked without also selecting the center circle area.

However, one will often have to experiment with Tolerance values a number of times in order to get the greatest area possible. There will be a point when the Tolerance is too high and more of the area is selected than one wants.

This illustration is not as complex with its backgrounds as some, so using the Magic Wand might only select just certain areas. However, it is often useful to try the Magic Wand and experiment with its values to see if you can get the selection you want.

 

The Selections Menu: Select All, Float, Defloat

There will be times when you will want to create a selection of a complex object that has a number of transparent areas. We will first create one such object and then explore this technique for creating a selection.

 
New Image     New Raster Layer

Paint Brush Tool or Airbrush Tool  Reset to Default

Materials Palette - Materials Box  Materials Gradient Option

Create a new image, 300 x 300 Pixels, 16 Million colors, white Background (remember: you can just hold the Shift key down when clicking on the menu item or on the New Image button to get an image with the last used settings without the New Image dialog).

Create a new top layer (Layers || New Raster Layer).

Select either the Paint Brush or Airbrush, click on 'Presets' and reset to default. In the Brush Tip drop-down list, locate either 'Marble 3' (which I am using), 'Pointy Flower', or 'Rounded Flower'. Then click on OK to set that Brush Tip.

Set your Foreground Material to Gradient:
– Gradient = Duotone lavender
– Angle = 0
– Repeats = 7
– Style = Radial
– Center Points = both set to 50

Then center the brush and click to paint that shape. (To center, watch the values in the Status bar until it says "x:150 y:150".)

 

Highlight the top layer in the Layers palette. Then go to:
1) Selections || Select All,
2) Selections || Float, and
3) Selections || Defloat.

These steps will create a selection around our object to include all transparent areas within the object. To ensure the canvas has transparency, turn off the bottom layer by clicking on the eye to the right of its name in the Layers palette.

Do not deselect yet.

 
Materials Palette - Materials Box  Materials Solid Color Option

New Raster Layer     Flood Fill Tool

Some Fun

Let's have some fun and enhance this image.

Go to Selections || Modify || Expand and set a value of 4.

Set your Foreground Material to Solid Color and select a dark blue.

Create a new layer between the bottom and the top layer.

Use the Flood Fill tool and flood-fill the selection.

Deselect (Ctrl+D).

This enhancement creates the illusion of a 3D object by adding a darker color underneath the main object by expanding the selection.

 
Materials Palette - Materials Box  Materials Gradient Option     Flood Fill Tool

Set your Material back to Gradient, and on the Gradient tab in the Materials dialog set:
– Gradient = Multi-blue
– Repeats = 0
– Style = Sunburst

Flood-fill the bottom layer with this gradient.

Highlight the top layer in the Layers palette and go to Adjust || Sharpness || Sharpen, then to Adjust || Sharpness || Sharpen More

This enhancement creates the illusion of a 3D object by adding a darker color underneath the main object. Also by using the background of a gradient we have what might look like a world in the sky.

 

Final Comments

The Magic Wand is a very flexible and easy-to-use tool to select areas of a graphic. Certainly the easiest use of the Magic Wand is selecting solid colors.

The 'Contiguous' or non-contiguous option allows selecting just those areas that are contiguous or all the areas of the graphic that match the settings. This option is very useful to select similar areas all at once rather than using the Add Mode to select each of the similar areas one at a time.

Although we did not use the Remove Mode, it can be used to remove unwanted areas. Sometimes using Tolerance and selecting more than wanted, one then can lower the Tolerance values and use Remove to remove parts of the selection.

It is well worth the time to experiment with this tool on various images, particularly photographs where the background may be very complex. One should also try both the Magic Wand as well as one of the Freehand Selection tool's Edge options to see how each might work to isolate an object (such as a person) in a photograph.

One can also use the Select All, Float and Defloat commands to surround an object with complex transparent areas with a selection. One could also use the Magic Wand with Contiguous not set to first select areas we want to remove to create transparent areas. (Experiment with this approach on the current canvas by painting the object on the white background rather than a separate layer. Then, you could promote the selection to its own layer, or create a new bottom layer.)

Enjoy.