3.3 The Select Menu and Friends
Keywords: GIMP, gimp, Gimp, GNU Image Manipulation Program, gnu image manipulation program, Gimp tutorials, GIMP tutorials, gimp tutorials, Linux applications, linux applications, editing digital images, digital image editing, photo touchup, photo enhancement, enhancement photos, touchup, enhancement, image touchup, image enhancement, enhancement images, touchup images, digital collage, collage, compositing, photo montage, montage, photos, images, stock photos, copyright free photos, selection, selections, mask, masks, color correct, color correction, colorspace, colorspaces, RGB, rgb, hsv, HSV, free-hand tool, free hand tool, lasso tool, bezier path tool, Bezier path tool, layer mask, layer masks, layer, layers, gradient tool, gradients, blend tool, blending, threshold tool, thresholding, histogram, curves tool, curves, levels tool, levels, color picker, eyedropper, wilber, wilber the gimp, Wilber the GIMP, magic wand, fuzzy-select tool, fuzzy select tool, crop tool, transform tool, text tool,  [cell cut: 1485 characters, first 1000 kept]

Next: 3.4 The Paths Dialog Up: 3. Selections Previous: 3.2 Combining Selections
Subsections

- 3.3.1 The `Invert` Function
- 3.3.2 The `All` Function
- 3.3.3 The `None` Function
- 3.3.4 The `Float` Function
- 3.3.5 The `Feather` Function
- 3.3.6 The `Sharpen` Function
- 3.3.7 The `Shrink` Function
- 3.3.8 The `Grow` Function
- 3.3.9 The `Border` Function
- 3.3.10 The `Save to Channel` Function
- 3.3.11 The `By Color` Function
- 3.3.12 The `To Path` Function
- 3.3.13 The `Toggle Selection` Function
- 3.3.14 `Copy`, `Cut`, and `Paste`
- 3.3.15 `Stroke`

#
3.3 The Select Menu and Friends

Complementary to the selection tools are the 12 functions in the `Image:Select` menu. In addition to these functions, there are five other important functions related to selections. These are `Toggle Selection`, found in the `Image:View` menu, and `Copy`, `Cut`, `Paste`, and `Stroke`, found in the `Image:Edit` menu. Each of these functions is described in this section.

##
3.3.1 The `Invert` Function

A selection partitions an image into two sets--the selected pixels and the unselected ones. It is often useful to invert a selection, which is just the swapping of these two sets. When inverting, the unselected pixels become selected pixels and vice versa. The command that does this is `Invert` from the `Image:Select` menu. The `Invert` function is used so often you'll want to remember the keyboard shortcut for it, which is `C-i`.

##
3.3.2 The `All` Function

The function `All` in the `Image:Select` menu selects everything in an image. If the active layer in the image is smaller than the largest layer, the selection is clipped to the boundaries of the active layer. I personally don't find this to be a very useful command.

##
3.3.3 The `None` Function

The function `None` in the `Image:Select` menu deselects everything in an image. This is very useful, as will be seen in the ensuing chapters. The keyboard shortcut for this command is `C-S-a`.

##
3.3.4 The `Float` Function

A selection can be made into a floating selection by choosing `Float` from the `Image:Select` menu. Floating selections were discussed in Section 2.5. A useful application of `Float` is described in Section 2.6.2.

##
3.3.5 The `Feather` Function

Feathering was explained in Section 3.1.2. Normally a feather is applied by toggling on the Feather checkbox in the selection tool's `Tool Options` dialog before making the selection. However, it is possible to apply a feather after the selection has been made by choosing `Feather` from the `Image:Select` menu.

##
3.3.6 The `Sharpen` Function

The concept of a partially selected pixel was introduced in Section 3.1.2, in the discussion on antialiasing, and was extended in Section 3.1.2, in the discussion on feathering. The function `Sharpen`, from the `Image:Select` menu, removes partially selected pixels in an image by transforming those that are 50% or more selected into fully selected pixels and by fully deselecting all the remaining pixels. Thus, this function sharpens the active selection (not the image).

##
3.3.7 The `Shrink` Function

It is sometimes useful to be able to shrink a selection a little. If a selection has been made with a tool like the `Magic Wand` or with the `By Color` selection function, it is possible that the resulting selection is a little too large. The `Shrink` function, found in the `Image:Select` menu, shrinks the boundary of the current selection by the amount specified in its dialog. The default unit is 1 pixel, but other values can be chosen.

##
3.3.8 The `Grow` Function

In contrast to `Shrink`, the function `Grow`, from the `Image:Select` menu, grows the boundary of the current selection by the amount specified in its dialog. The default unit is 1 pixel.

##
3.3.9 The `Border` Function

The `Border` command, found in the `Image:Select` menu, replaces a selection with just those pixels within a specified radius of the selection edge. Thus, this function creates a selection of the border around the previous selection's edge. This command is a combination of the two functions `Shrink` and `Grow`. In particular, if A represents the set of selected pixels obtained by applying `Grow` to a selection and B represents the set obtained by applying `Shrink`, `Border` produces the set that could otherwise be obtained by doing A-B (see Section 3.2 for more on combining selections). The width of the border is specified by the border dialog.

Figure 3.16(a)

Figure 3.16: The Effect of `Border`

illustrates an image with a selection, and Figure 3.16(c) shows the result of applying `Border`. The value chosen for the border is shown in the associated dialog, illustrated in Figure 3.16(b). Note that the dialog contains a menu that allows the border width to be specified in a variety of different units. The default unit is pixels.

`Border` is particularly useful for refining selection edges. An example of using `Border` is presented in Section 7.4.

##
3.3.10 The `Save to Channel` Function

Channels were introduced in Section 2.2. As will be discussed in greater detail in Section 4.1, channels can be used to store selections. This is an extremely useful feature of the GIMP because it allows you to save your selections, to reuse them in the current image or in others, and to edit them with the masking utilities (more on this in Chapter 4). The operation of saving a selection to a channel is performed with the `Save to Channel` function, found in the `Image:Select` menu.

Figure 3.17(a)

Figure 3.17: Saving a Selection to a Channel

illustrates an image with a selection, and Figure 3.17(b) shows the Channels dialog after applying the function `Save to Channel`. The Channels dialog for an image is displayed by typing `C-l` in the image window to bring up the `Layers & Channels` window and clicking on the Channels tab.

It can be seen in Figure 3.17(b) that, other than the usual Red, Green, and Blue channels usually found in the Channels dialog, there is a channel named Selection Mask Copy. This channel shows a thumbnail of the mask representing the selection. Much more on the subject of masks and selections is discussed in Chapter 4. This is a very powerful feature of the GIMP. Check it out!

##
3.3.11 The `By Color` Function

The `By Color` selection tool, found in the `Image:Select` menu, is similar to the `Magic Wand` in that it automatically selects pixels in the active layer that are close in color to a seed pixel value. The difference, however, is that the selected pixels are not obtained by growing a contiguous region around the seed. The `By Color` selection tool selects all the pixels in the layer that are within a specified threshold of the seed pixel's color. This is a subtle but important difference. It means that if two regions of similar pixel colors are separated by one of very different values, the `By Color` selection tool will get both regions, and the `Magic Wand` will not.

Choosing `By Color` brings up the dialog pictured in Figure 3.18(a).

Figure 3.18: The `By Color` Selection Tool

This dialog box allows a Fuzziness Threshold to be chosen. The default is normally 15, but here it has been set to 30. This number determines how far a pixel can vary in color from the seed pixel's and still be selected. The seed is chosen by clicking in the image window.

Clicking in the image window produces a black and white mask in the thumbnail area of Figure 3.18(a). This mask corresponds to a selection in the image window, as can be seen in Figure 3.18(b). The selection can be removed by clicking on the `Reset` button in the `By Color Selection` dialog.

When the dialog's Replace radio button is selected, clicking a second time in the image window replaces the selection that was there with one based on the new seed pixel's color. The three other radio buttons in the dialog can be used to add, subtract, or intersect the selection created with the `By Color` function with an existing selection in the image window. Adding, subtracting, and intersecting selections was explained in Section 3.2.

##
3.3.12 The `To Path` Function

Selections can be converted to Bezier paths. As was described in Section 3.1.1, Bezier paths are extremely useful tools because they allow selections to be interactively modified. The `To Path` function, found in the `Image:Select` menu, converts a selection to a Bezier path by automatically finding the control points and the control handle settings to re-create the selection.

Figure 3.19(a)

Figure 3.19: Converting a Selection to a Bezier Path

illustrates a selection created with the `Ellipse Select` tool, and Figure 3.19(b) shows the result of applying `To Path` to it. Applying this function removes the selection from the image window and replaces it with a Bezier path. The path can now be used to interactively modify the selection, as described in Section 3.1.1. To recover the selection click inside the closed path.

Note that clicking inside a path to convert it to a selection might not toggle off the path's visibility. If this happens, the path can be toggled off by clicking on any icon (other than the `Bezier Path`'s) in the Toolbox. Much more on Bezier paths is covered in Section 3.4.

##
3.3.13 The `Toggle Selection` Function

Unlike the other selection functions discussed in this section, `Toggle Selection` is found in the `Image:View` menu. This command is very useful when trying to carefully position layers or selections (for examples, see any project in Chapter 7), or when trying to color-match a layer or selection edge (for an example, see Section 7.5).

The `Toggle Selection` command toggles on and off the visibility of a selection's Marching Ants. However, this function does not eliminate the selection. The selection is still there, it is just not visible in the image window. The `Toggle Selection` feature also toggles on and off the visibility of the black-and-yellow layer boundaries in an image. This feature is also used extensively in Chapter 7.

There is a pitfall when using `Toggle Selection`. It is easy to forget that selection boundaries have been toggled off. This can lead to confusion, especially when a subsequent selection is made. Because selection visibility has been toggled off, the Marching Ants do not appear. I've scratched my head many times, trying to figure out why all of a sudden the GIMP no longer seemed to be working! The GIMP, of course, was working just fine. The selection is there; it just can't be seen until its visibility is toggled back on.

The `Toggle Selection` function is so useful that you might want to memorize its keyboard shortcut, which is `C-t`.

##
3.3.14 `Copy`, `Cut`, and `Paste`

`Copy`, `Cut`, and `Paste` are probably the most frequent operations performed on selections. These three functions are found in the `Image:Edit` menu. However, they are used so frequently that it would be worth your while to memorize their keyboard shortcuts. The keyboard shortcut for `Copy` is `C-c`, `Cut` is `C-x`, and `Paste` is `C-v`. More on these functions can be found in Section 2.4.

##
3.3.15 `Stroke`

The `Stroke` function is found in the `Image:Edit` menu. This command paints a selection edge's outline with the active foreground color using the active brush. Figure 3.20(a)

Figure 3.20: The Effect of Stroke

illustrates an image with a selection, and Figure 3.20(c) shows the effect of applying `Stroke` to it using black as the foreground color. As indicated in Figure 3.20(b), a soft round brush was used to stroke the selection.

Next: 3.4 The Paths Dialog Up: 3. Selections Previous: 3.2 Combining Selections
©2000 Gimp-Savvy.com