The Align tool is useful to align the image layers with various image objects. When this tool is selected, the mouse pointer turns to a small hand. By clicking on an element of a layer in the image, you choose the layer which will be moved (with Shift + click, you can choose several layers to be aligned); this focused layer has small squares in corners and is called target. Various buttons in the dialog allow you to select how the layer will be moved. And you can select the image object (other layer, selection, path...) the selected layer will be aligned with.
You can activate the Align tool in several ways :
from the image-menu, through: → → ,
by clicking on the tool icon:
in the toolbox,
by using the Q keyboard shortcut.
You can select several layers by holding Shift when clicking the layers.
![]() | Tip |
|---|---|
|
Sometimes it's easier to choose multiple layers using rubber-banding: click somewhere outside an imaginary rectangular region covering the layers you want to choose. Then drag out that region by moving the pointer, and release the mouse button. Now every layer, which is completely inside the dragged rectangle, is selected. Note that now there is no target “first item” the selected layers can be aligned on. |
Normally, tool options are displayed in a window attached under the Toolbox as soon as you activate a tool. If they are not, you can access them from the image menu bar through → → which opens the option window of the selected tool.
To reference the image object the layer will be aligned with.
First item: the first selected item when selecting multiple layers holding the Shift key. Note that there is no “first item” when you select multiple layers using rubber-banding.
Image: the image is used as alignment reference.
Selection: the selection is used as alignment reference.
Active layer: the active layer, in the layer dialog, is used as alignment reference.
Active Channel: the active channel is used as alignment reference.
Active Path: the active path is used as alignment reference.
Figure 14.119. Alignment References Examples
An image with a selection, a text layer and an active layer. This layer is cropped to content.
Image is the alignment reference. The
(Align right edge of target) command has been used.
Figure 14.120.
Selection is the alignment reference
Active layer is the alignment reference
Path is the alignment reference
These buttons become active when a target is selected.
: to
align left edge of target with left edge of reference.
: to
align center of target with center of
reference horizontally.
: to
align right edge of target with right edge of reference.
: to
align top edge of target with top edge of
reference.
: to
align center of target with center of
reference vertically.
: to
align bottom edge of target with bottom edge of
reference.
These options are used when you have several targets and want to arrange them. “targets” are the layers selected with Shift + Click.
Note that “Relative to” options are active when using Distribute.
: to
distribute left edges of targets with left edge of
reference.
: to
distribute centers of targets with center
of reference horizontally.
: to
distribute right edges of targets with right edge of
reference.
: to
distribute top edges of targets with top edge of
reference.
: to
distribute centers of targets with center of
reference vertically.
: to
distribute bottom edges of targets with bottom edge
of reference.
: to
distribute targets evenly in the horizontal.
: to
distribute targets evenly in the vertical.
Last both buttons ones are new in GIMP-2.10.
This offset can be positive or negative and is expressed in pixels. Distribute add it to the left edges, horizontal centers, right edges, top edges, vertical centers, or bottoms of targets.
Figure 14.121. Example for the “Distribute” commands
Base image: three layers.
(Distribute right edges of targets) will
be used.
Figure 14.122. Origin
We select them as targets with Shift + Click.
Alignment reference (Relative to) is
“Image”. Offset = 0. We used the
(Distribute vertical centers of targets) command.
After using the
(Distribute targets
evenly in the horizontal) with offset = 5.
Figure 14.123. Align using rubber-band box
We clicked left from and above the red layer, and dragged out a region covering the red and the yellow layer by moving the pointer towards the bottom right corner.
“Selection” is the reference. After a click
on the
button, both layers align with the left side of the
selection.