Go to TopIntroducing Layers

Layers are an important tool in image editing. They can be used to combine completely different images, make a variety of complex practice edits to a single image which can then be undone by removing the layer on which they were executed, or just as the simplest route to a particular goal.

Layers are best thought of as one or more sheets of transparent film laid over an original background image. Any number of layers can be added above the background, each of which may be fully or partially "painted" with either completely new material or that taken from the same or another image. Similarly, anything on a layer can be deleted, leaving a transparent area through which the contents of a lower layer can be seen. Layers may also be reordered in the stack so that the image on one may be made to partially obscure the image on a lower layer.

As an example, the combined KompoZer and Gimp logo seen on the Home page of the GregTutor web site was created by using the Fuzzy Select (Magic Wand) to select the feather on the KompoZer logo. Next the feather selection was copied and pasted back onto the image and, once floating, promoted to become a layer.Then the GIMP logo was pasted on to the image, and promoted to become a layer. Finally, the GIMP layer was lowered to below the feather layer.

Go to TopManaging Layers

The Layer Pallette

The Layer Pallette

Layers are controlled through the Layers Dialogue, shown here docked in the Toolbox. The controls at the top of the dialogue offer some layer refinements and are not considered here.

In the centre is the main layer display. On first loading a photograph (JPG file) this will show a highlighted bar, blue when selected, that includes a small thumbnail of the image, labelled "Background", and two buttons on the left. These both operate as toggles.

The first shows an eye. Clicking the eye will make the layer invisible, revealing the next layer down. When there is only a background layer this will reveal a chequerboard pattern that indicates transparency. Click again to restore the eye symbol and layer visibility.

The second is a Link button. Activating a link ties all linked layers together. Moving, flipping, or other transformations to any linked layer, affects all the linked layers.

Double-clicking the layer label, initially "Background", will allow you to edit the text, a useful facility once you working with a number of layers.

At the bottom of the palette are six buttons, not all of which will be immediately active. From left to right these create a new layer, move layers up and down in the stack, duplicate the currently selected layer, anchor (merge) the current layer with the one below, and delete the current layer.

Right-clicking on a layer produces an extensive menu, repeating many of the options available directly from the dialogue. Especially useful is the option to add an Alpha Channel. This additional colour channel, the standard ones are red green and blue, adds transparency. With an Alpha channel added to the layer, when colour is deleted, instead of showing the background colour, it shows the colour of the layer underneath.

Go to TopExample 1: Duplicating Objects

Here we take a photograph with a few sheep and add another. The process could be extended indefinitely to add as many sheep as you like. The technique used here to select the sheep is crude. Don't imitate it for serious work! However, do note how the layer is created from a selection.

Go to TopCreate a Layer

Complete the following steps:

Selection copied and pasted

Selection copied and pasted

1. A sheep is selected with a feathered elliptical selection. (Black and white marching ants appear.)

2. Copy and paste this selection. The standard Windows keystrokes: CTRL-C followed by CTRL-V make this extremely quick and easy!

(A black and yellow Selection border appear is added to the marching ants.)

Create New Layer from Floating Selection

3. In the Toolbox, select the tab for the layer dialogue  then select the Floating Selection and click the New Layer button at the bottom of the Layer Dialogue.

(The marching ants disappear. The floating selection becomes a layer named "Pasted Layer". The layer will appear transparent if the selection is only a very small portion of the entire image and is too small to show on the thumbnail.)

Create New Layer from Floating Selection

Renamed Layer

4. Double-click over the text "Pasted Layer" to enter editing mode and type an appropriate name, e.g. "SheepFacingLeft", and hit the Carriage Return key to confirm the change. 

Renamed Layer

Go to TopMove a Layer

The Move Tool Options

The Move Tool Options

Complete the following steps:

1. On the Toolbox, select the Move tool (The Arrow-Headed Cross).

Before attempting Step Two take careful note of how to control the Move Tool.

The Move Poiinters

The Move Poiinters

By default, the Move Tool allows you to pick a layer to move. The pointer indicates which layer will move as you drag. Point directly at the selected object. Being within the layer boundary is NOT enough, especially if there is feathering involved. Check for the correct Move Pointer (No Hand) before dragging, otherwise you will move the background, NOT the selected layer. It is recommended you use SHIFT-drag as indicated in the tip below! This over-rides the effect indicated by the pointer shape.

2. Drag the sheep layer to move it.

Layer being Moved

Layer being Moved

TIP: Consider engaging the "Move the active layer" option. As the Move Options dialogue indicates, this can be done simply by holding the Shift key while using the tool, as well as by selecting the appropriate radio button on the Options dialogue.

Go to TopExample 2: Overlapping Objects

Carrying on from the previous example, the same general techniques are employed. This time we stack another copy of our original sheep behind others already in the image.

Go to TopCreating the Layer

TIP: The images in this example are zoomed in on the pair of sheep, in order to show better the layering effects, but it is best to work in a window where you can see both SheepFacingLeft and the SheepPair layers.

Pair of Sheep made into Layer

Pair of Sheep made into Layer

Complete the following steps:

1. Ensure the Background layer is selected.

(Failure to execute this step will mean that you attempt to select empty space on the current layer. When selecting the Background any black and yellow boundary should disappear.)

2. Using the Free Select (Lasso) Tool make an accurate selection of the pair of sheep toward the right foreground.

(This time we can't afford any surplus grass around the sheep, so the crude elliptical selection won't do!)

3. Use the same techniques as before to copy and paste the selection and promote it to become a layer. Name the layer "SheepPair".

Go to TopDuplicate a Layer

Duplicating a Layer

Complete the following Steps:

Duplicating a Layer

1. In the Toolbox, select the tab for the layer dialogue  then select the "SheepFacingLeft" layer and click the Duplicate Layer button at the bottom of the Dialogue.

(A new layer named "SheepFacingLeftCopy" appears n the stack immediately above the original.)

2. Rename this layer to "SheepFacingRight".

(Given the name suggested we'll now turn it round!)

3. With the new layer still selected, on the Image Window, open the "Layer" menu and select "Transform" then "Flip Horizontally".

(The new sheep should be facing right!)

Go to TopMove and Promote the Layers

Complete these Steps:

Overlapping Layers

Overlapping Layers

1. With the "SheepFacingRight" layer still selected, select the Move Tool and drag the layer so it overlaps the "SheepPair" layer.

(The sheep being dragged will appear to slip behind the pair of sheep. This is because the "SheepPair" layer is at the top of the stack and so fully visible.)

If we tried to raise the "SheepFacingRight" layer to the top of the stack, our crude elliptical selection will be revealed, so let's make an accurate selection of a  sheep.

1. Select the "SheepFacingLeft" layer, then the Free Select (Lasso) Tool.

2. Make an accurate selection of the sheep on the layer, and then copy and paste it.

3. In the Toolbox, select the Layers tab then select the Floating Selection at the top of the stack and, finally, click the New Layer button at the bottom of the dialogue.

4. Select the Move Tool and drag the new "Pasted Layer" over the pair of sheep.

(Because the new "Pasted Layer" is on top of the stack it obscures the SheepPair layer.)

Another Layer is moved 

Another Layer is moved 

Raising the Layer by Dragging

Raising the Layer by Dragging


5. On the Layers dialogue, select the "SheepPair" layer and then either click on the "Raise Layer" button at the bottom of the dialogue or drag the SheepPair thumbnail to the top of the stack of layers.

(With the "SheepPair" layer back to the top of the stack, it then obscures the other layers.)

Go to TopExample 3: Using Transparency

Here we take a photograph with massively over exposed sky and replace it with a blue sky with light fluffy clouds from another image. (Looks like I added some contrast and changed the colour balance somewhere along the way too!)

Photograph with over exposed Sky Photograph with new sky Inserted

To achieve this, first an alpha channel is added to take advantage of the transparency it offers. The sky is then selected before being deleted. Once deleted the sky will take on a chequerboard pattern to indicate its transparency.

A new sky is pasted in from another image. From its initial state as a floating selection it is promoted to become a layer. Finally, the layer is lowered under the background, where is shows through the now transparent sky.

Photograph with over exposed Sky Photograph with new sky Inserted

Tranparent Area after Deleting the Selection

Tranparent Area after Deleting the Selection

SKy pasted onto the Original Image

SKy pasted onto the Original Image

Other than the details of the addition of the alpha channel and the selection techniques, the techniques used are exactly the same as in the other examples, so these screen shots should be a sufficient reminder.

Dragging a Layer down the Stack

Dragging a Layer down the Stack

To add the alpha channel:
Right-click on the "Background" layer and select "Add alpha channel" from the menu.
To select the sky:
Use a combination of Free Select and then Colour Select, using Intersect mode. Almost certainly Feather and Grow techniques will also be needed to achieve an acceptable result.

Ideally, you will have a large file prepared showing nothing but sky, then you don't need to mark out a selection but just hit CTRL-C as soon as the image is loaded to place it on the clipboard.

Alternatively, you'll need to load an image and select the area of sky to be used. Resist the temptation to scale an under-sized area of sky to fit the space on the original image, as the inevitable distortions may become obvious in the finished image. Rather, blend together additional copies to fill the transparent area.

Go to Top Page updated: 1 October 2009