7.9. Align Visible Layers

This command can be accessed from an image menubar as Layer->Align Visible layers. There is no default shortcut.

Image for example: four layers on a large canvas 150x150 (they might be images): red is 10x10 pixels, green is 10x20 and yellow is 20x10. The background layer (blue:100x100) will not move, as the "Ignore lower layer" option will be checked. Note that, because of their position on canvas, layers in image seem to have an order different from the order in stack (the yellow layer is the top layer in image and is second in stack).

"Align Visible Layers" allows you to position visible layers (with the eye icon turned on) very precisely. This precision in not useful on usual image editing; it is much more useful when working on animations, with many small layers. By clicking on this command, you open a dialog containing many alignments settings.

[Note] Note

In Gimp-1.2, the default alignment base was the upper visible layer in the stack. In Gimp-2, this default alignment base is now the canvas edge. You can still align on the bottom layer of the stack, even if it is invisible, by checking the "Use the (invisible)bottom layer as the base" in the dialog.

Options

Horizontal/Vertical Style

This option controls how layers are horizontally/vertically moved in relation to each other:

  • None: No change in horizontal/vertical position.

  • Collect: This option aligns the selected "Horizontal/Vertical base" (Left edge, Centre, Right edge / Top edge, Center, Bottom edge) of every visible layer onto the canvas left/top edge. If you select Right Edge, layers disappear from the canvas; you can see them again by enlarging the canvas.If the "Bottom Layer as Base" option is checked, layers are aligned on the left/top edge of the bottom layer.

    Layers have moved horizontally to align their left edge onto the left edge of the canvas.

    Layers have moved horizontally to align their left edge onto the bottom layer left edge.

  • Fill (left to right / Top to bottom): This option places the selected base of visible layers regularly, horizontally / vertically on the image, in the top to bottom order of the stack. The upper layer in the stack is placed on the leftest (uppest) position in the image. The lower layer in the stack is placed on the rightest (lowest) position in the image. Other layers are placed regularly between both positions. If the "Bottom layer as base" option is checked, the layer base is aligned onto the corresponding edge of the bottom layer.

    Horizontal filling alignment, Left to Right, "Bottom layer as base" unchecked. The green layer, first in stack, is placed on the left horizontal position that was that of the yellow layer. The red layer is placed on the right horizontal position that was that of the green layer. Note the regular spacing between base layers and the layer horizontal order, that of the Layer Dialog stack.

    Horizontal filling alignment, Left to Right, Bottom Layer as base

  • Fill (right to left / Bottom to top): As above , this function reads layer stack from top to bottom, but displays layers right to left, bottom to top, regularly.

    Vertical filling alignment, Bottom to top, Bottom layer as base

    Filling options need three visible layers at least.