30
30
<div class="titlepage">
33
<h3 class="title"><a id="gimp-layer-mask"></a>2.2. Layer masks</h3>
33
<h3 class="title"><a id="id3333822"></a>2.2. Using the Layerdialog</h3>
38
<div class="mediaobject">
39
<img src="../images/dialogs/dialogs-layer-addmask.png" />
41
37
<div class="variablelist">
46
A transparency mask can be added to each layer, it's called Layer
47
mask. A layer mask has the same size and same pixel number as
48
the layer to which it is attached. Every pixel of the mask can
49
then be coupled with a pixel at the same location in the layer.
50
The mask is a set of pixels in graytone on a value scale from 0
51
to 255. The pixels with a value 0 are black and give a full
52
transparency to the coupled pixel in the layer. The pixels with
53
a value 255 are white and give a full opacity to the coupled
57
To create a layer mask start with a right click on the layer to
58
call the context menu and select <span class="guilabel">Add layer
59
mask</span> in the menu. If the menu item is grayed first
60
select <span class="guilabel">Add Alpha channel</span> in the same menu.
61
A dialog appears where you can initialize the content of the
64
<div class="itemizedlist">
68
<span class="guilabel">White</span>: the mask has no effect,
69
all layer pixels are full visible.
74
<span class="guilabel">Black</span>: the mask gives a full
76
to the layer which becomes invisible.
81
<span class="guilabel">Layer's Alpha channel</span>: the mask is
82
initialized according to the content of layer Alpha
83
channel. If the layer still contains transparency it's
89
<span class="guilabel">Selection</span> : the mask is initialized
90
according to pixel values found in the selection.
95
<span class="guilabel">Grayscale copy of layer</span>: the mask
97
initialized according to pixel values of the layer.
105
When the mask is created it appears as a thumbnail right to the
106
layer thumbnail. By clicking alternatively on the layer and mask
107
thumbnail you can enable one or other. The active itemis
108
highlighted by a white border (which is not well visible around a
109
white mask). To view mask content instead of its effect in image
110
window, press <span><b class="keycap">Ctrl Alt</b></span> and then on mask
111
thumbnail. To return to normal view redo last operation.
113
<div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;">
114
<table border="0" summary="Caution">
40
<span class="term">Overview</span>
44
Every layer appears in the dialog in form of a thumbnail. When
45
an image has many layers as components then it appears like a
46
list. The upper layer in the list is the first one visible and
47
the lowest layer the last visible, the background. Above the
48
list one can find characteristics related individually to each
49
layer. Under the list one can find managements buttons for the
50
layer list. A right-click in a layer thumbnail opens the layer
51
<a href="ch05s07.html" title="7. Layers">menu</a>.
55
<span class="term">Layer attributes</span>
59
Every layer is shown in the list with its own attributes. The
60
main attribute is the name of the layer itself. You can edit it
61
by a double-click on the name or the thumbnail of the layer. In
62
front of the thumbnail is an icon showing an eye
63
<span class="guiicon">
64
<span class="inlinemediaobject"><img src="../images/dialogs/dialogs-icon-eye.png" /></span>
65
</span>. By clicking on the eye, you toggle whether the layer is
66
visible or not. (Shift-clicking on the eye causes all
67
<span class="emphasis"><em>other</em></span> to be temporarily hidden.) An
68
other icon showing a chain <span class="guiicon">
69
<span class="inlinemediaobject"><img src="../images/dialogs/dialogs-icon-vchain.png" /></span>
70
</span> enables to group layers for operations on multiples
71
layers (for example with the Move tool).
73
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
74
<table border="0" summary="Tip">
116
76
<td rowspan="2" align="center" valign="top" width="25">
117
<img alt="[Caution]" src="../images/caution.png" />
77
<img alt="[Tip]" src="../images/tip.png" />
119
<th align="left">Caution</th>
79
<th align="left">Tip</th>
122
82
<td colspan="2" align="left" valign="top">
123
The layer mask acts like a transparency mask on a particular
124
layer. Since you have many layers it becomes different from the
125
image Alpha channel which represents transparency applied to the
84
In case of an animation layer GIF or MNG the name of the
85
layer can be used to specify some parameters : Layer_name
86
(delay in ms) (combination mode), for example Frame-1 (100
87
ms) (replace). The <span class="guilabel">delay</span> set the time
88
during the layer is visible in the animation. The combination
89
mode set if you combine with the previous layer or replace
90
it: the two modes are (combine) or (replace).
98
<span class="term">Layers characteristics</span>
102
Above the layer list it's possible to specify some properties for
103
the active layer. The active layer is the one highlighted in blue. The
104
properties are : "Layer mode", "Keep transparency", and "Opacity".
106
<div class="itemizedlist">
109
<div class="mediaobject">
110
<img src="../images/dialogs/dialogs-layer-modes.png" />
113
<span class="guilabel">Layer modes</span>:
114
The layer mode determines how the layer interact with the
115
other layers. From the combo box you can access to all the
116
mode provided by Gimp. The layer modes are full detailled
117
in the <a href="go01.html#glossary-modes">Glossary</a>.
121
<div class="mediaobject">
122
<img src="../images/dialogs/dialogs-layer-keeptrans.png" />
125
<span class="guilabel">Keep transparency</span>: If you check this
126
option the transparent areas of the layer will be keeped,
127
this even if you have checked the <span class="guilabel">Fill
128
transparent areas</span> option for the Bucket fill
134
<span class="inlinemediaobject"><img src="../images/dialogs/dialogs-layer-opacity.png" /></span>
137
<span class="guilabel"><a id="gimp-layer-dialog-opacity-scale"></a>Opacity</span>:
138
By moving the slider you give less or more opacity to the
139
layer. With a 0 opacity value the layer is transparent and
140
full invisible. Don't mistake with the Layer mask (see
141
chapter Layer mask) that sets the transparency pixel by
149
<span class="term">Layer management</span>
153
Under the layer list a set of buttons allows you to perform
154
some basis operations on the layer list.
156
<div class="itemizedlist">
160
<span class="inlinemediaobject"><img src="../images/dialogs/dialogs-icon-edit.png" /></span>
161
<span class="guilabel">Edit layer attributs</span>:
162
You can change here the name of the active layer in the list.
166
<a id="gimp-layer-new"></a>
168
<span class="inlinemediaobject"><img src="../images/dialogs/dialogs-icon-new.png" /></span>
169
<span class="guilabel">New layer</span>:
170
You can create here a new layer. A dialog is opened where
171
you have to fill the <span class="guilabel">Layer name</span>,
172
perhaps change default <span class="guilabel">Height</span> and
173
<span class="guilabel">Width</span> choose the <span class="guilabel">Layer fill
174
type</span> which will be the new layer background.
178
<a id="gimp-layer-raise"></a>
180
<span class="inlinemediaobject"><img src="../images/dialogs/dialogs-icon-raise.png" /></span>
181
<span class="guilabel">Raise layer</span>:
182
You can here put the layer up a level in the list. Press the
183
<span><b class="keycap">Shift</b></span> key to move the layer to the top of
188
<a id="gimp-layer-lower"></a>
190
<span class="inlinemediaobject"><img src="../images/dialogs/dialogs-icon-lower.png" /></span>
191
<span class="guilabel">Lower layer</span>:
192
You can here put the layer down a level in the list. Press the
193
<span><b class="keycap">Shift</b></span> key to move the layer to the bottom of
196
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
197
<table border="0" summary="Tip">
199
<td rowspan="2" align="center" valign="top" width="25">
200
<img alt="[Tip]" src="../images/tip.png" />
202
<th align="left">Tip</th>
205
<td colspan="2" align="left" valign="top">
207
To move a layer at the bottom of the list, first
208
give a transparency channel to the Backgrpund layer
209
(also called Alpha channel). Right click on the
210
Background layer and select <span class="guilabel">Add Alpha
211
channel</span> in the menu.
221
<a id="gimp-layer-duplicate"></a>
223
<span class="inlinemediaobject"><img src="../images/dialogs/dialogs-icon-duplicate.png" /></span>
224
<span class="guilabel">Duplicate layer</span>:
225
You can create here a copy of the active layer. Name of new
226
layer is suffixed with a number.
230
<a id="gimp-layer-anchor"></a>
232
<span class="inlinemediaobject"><img src="../images/dialogs/dialogs-icon-anchor.png" /></span>
233
<span class="guilabel">Anchor layer</span>:
234
When the active layer is a temporary layer (also called floating
235
selection) shown by this icon
236
<span class="guiicon">
237
<span class="inlinemediaobject"><img src="../images/dialogs/dialogs-icon-floating.png" /></span>
239
this button anchors it in the previous active layer.
243
<a id="gimp-layer-delete"></a>
245
<span class="inlinemediaobject"><img src="../images/dialogs/dialogs-icon-delete.png" /></span>
246
<span class="guilabel">Delete layer</span> :
247
You can here delete the active layer.