1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>4.4. The Selection</title>
<link rel="stylesheet" href="gimp-help-plain.css" type="text/css" />
<link rel="stylesheet" href="gimp-help-screen.css" type="text/css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1" />
<link rel="start" href="index.html" title=" " />
<link rel="up" href="ch02s04.html" title="4. Working with Images" />
<link rel="prev" href="ch02s04s03.html" title="4.3. Layers" />
<link rel="next" href="ch02s04s05.html" title="4.5. Undoing" />
</head>
<body>
<div xmlns="" class="navheader">
<table width="100%" summary="Navigation header">
<tr>
<th colspan="3" align="center" id="chaptername">4.4. The Selection</th>
</tr>
<tr>
<td width="20%" align="left"><a accesskey="p" href="ch02s04s03.html">Prev</a> </td>
<th width="60%" align="center" id="sectionname">4.4. The Selection</th>
<td width="20%" align="right"> <a accesskey="n" href="ch02s04s05.html">Next</a></td>
</tr>
</table>
<hr />
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="gimp-selection"></a>4.4. The Selection</h3>
</div>
</div>
</div>
<p>
Often when you operate on an image, you only want part of it to be
affected. In Gimp, you make this happen by
<span class="emphasis"><em>selecting</em></span> that part. Each image has a
<span class="emphasis"><em>selection</em></span> associated with it. Most, but not
all, Gimp operations act only on the selected portions of the
image.
</p>
<p>
</p>
<div class="informalfigure">
<div class="mediaobject">
<img src="../images/using/fog-tree-example.png" />
<div class="caption">
<p>
How would you isolate the tree?
</p>
</div>
</div>
</div>
<p>
There are many, many situations where creating just the right
selection is the key to getting the result you want, and often it
is not very easy to do. For example, in the image to the right,
suppose I want to cut the tree out from its background, and paste
it into a different image. In order to do this, I need to create
a selection that contains the tree and nothing but the tree. It
is difficult because the tree has a very complex shape, and in
several spots is hard to distinguish from the objects behind it.
</p>
<p>
</p>
<div class="informalfigure">
<div class="mediaobject">
<img src="../images/using/select-outline.png" />
<div class="caption">
<p>
Selection shown as usual with dashed line
</p>
</div>
</div>
</div>
<p>
Now here is a very important point, and it is crucial to
understand this. Ordinarily when you create a selection, you see
it as a dashed line enclosing a portion of the image. The idea
you could get from this is that the selection is a sort of
container, with the selected parts of the image inside, and the
unselected parts outside. This concept of the selection is okay
for many purposes, but it is not really correct.
</p>
<p>
Actually the selection is implemented as a
<span class="emphasis"><em>channel</em></span>. In terms of its internal structure,
it is identical to the red, green, blue, and alpha channels of an
image. Thus, the selection has a value defined at each pixel of
the image, ranging between 0 (unselected) and 255 (fully
selected). The advantage of this approach is that it allows some
pixels to be <span class="emphasis"><em>partially selected</em></span>, by giving
them intermediate values between 0 and 255. As you will see,
there are many situations where it is desirable to have smooth
transitions between selected and unselected regions.
</p>
<p>
What, then, is the dashed line that appears when you create a
selection?
</p>
<p>
It is a <span class="emphasis"><em>contour line</em></span>, dividing areas that are
more than half selected from areas that are less than half
selected.
</p>
<p>
</p>
<div class="informalfigure">
<div class="mediaobject">
<img src="../images/using/select-outline-qmask.png" />
<div class="caption">
<p>
Same selection in QuickMask mode
</p>
</div>
</div>
</div>
<p>
You should always bear in mind, when looking at the dashed line
that represents the selection, that it only tells you part of the
story. If you want to see the selection in complete detail, the
easiest way is to click the QuickMask button in the lower left
corner of the image window. This causes the selection to be shown
as a translucent overlay atop the image. Selected areas are
unaffected; unselected areas are reddened. The more completely
selected an area is, the less red it appears.
</p>
<p>
QuickMask mode, and its uses, are described in detail below.
Meanwhile, if you are following this discussion by trying things
out in Gimp, you should know that many operations work differently
in QuickMask mode, so go ahead and toggle it off again for now (by
clicking the QuickMask button once more).
</p>
<p><b>Feathering. </b>
</p>
<div class="informalfigure">
<div class="mediaobject">
<img src="../images/using/select-outline-qmask-feather.png" />
<div class="caption">
<p>
Same selection in QuickMask mode after feathering
</p>
</div>
</div>
</div>
<p>
With the default settings, the basic selection tools, such as the
Rectangle Select tool, create sharp selections. Pixels inside the
dashed line are fully selected, and pixels outside completely
unselected. You can verify this by toggling QuickMask: you see a
clear rectangle with sharp edges, surrounded by uniform red. In the
Tool Options, however, is a checkbox called "Feather". If you enable
this, the tool will instead create graduated selections. The feather
radius, which you can adjust, determines the distance over which the
transition occurs.
</p>
<p>
If you are following along, try this out with the Rectangle Select
tool, and then toggle QuickMask. You will now see that the
clear rectangle has a fuzzy edge.
</p>
<p>
Feathering is particularly useful when you are cutting and
pasting, in helping the pasted object to blend smoothly and
unobtrusively with its surroundings.
</p>
<p>
Actually, it is possible to feather a selection at any time, even
if it was originally created as a sharp selection. You can do
this from the image menu, by choosing
<span class="guimenu">Select</span>-><span class="guimenuitem">Feather</span>.
This brings up a dialog that allows you to set the feather
radius. You can do the opposite--sharpen a graduated
selection into an all-or-nothing selection--by choosing
<span class="guimenu">Select</span>-><span class="guimenuitem">Sharpen</span>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25">
<img alt="[Note]" src="../images/note.png" />
</td>
<th align="left">Note</th>
</tr>
<tr>
<td colspan="2" align="left" valign="top">
<p>
For technically oriented readers: feathering works by applying a
Gaussian blur to the selection channel, with the specified
blurring radius.
</p>
</td>
</tr>
</table>
</div>
</div>
<div class="navfooter">
<hr />
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left"><a accesskey="p" href="ch02s04s03.html">Prev</a> </td>
<td width="20%" align="center">
<a accesskey="u" href="ch02s04.html">Up</a>
</td>
<td width="40%" align="right"> <a accesskey="n" href="ch02s04s05.html">Next</a></td>
</tr>
<tr>
<td width="40%" align="left" valign="top">4.3. Layers </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
<td width="40%" align="right" valign="top"> 4.5. Undoing</td>
</tr>
</table>
</div>
</body>
</html>
|