Creating a layer mask in GIMP allows you to selectively modify a layer's transparency, making it a vital tool for non-destructive image editing. Here's how to do it:
Adding a Layer Mask
There are a couple of ways to add a layer mask in GIMP:
1. Using the Context Menu
- Right-click on the layer you want to add a mask to in the "Layers" panel.
- In the context menu that appears, select "Add Layer Mask...". This opens the "Add Mask Options" dialog box.
2. Using the Menu Bar
- Select the layer you want to add a mask to in the "Layers" panel.
- Go to the menu bar and click Layer.
- Navigate to Mask and then select Add Layer Mask.... Again, this will open the "Add Mask Options" dialog box.
Understanding the "Add Mask Options" Dialog
When you add a layer mask using either of the above methods, the "Add Mask Options" dialog box appears. This dialog offers different ways to initialize the mask, each affecting how the transparency is applied:
Option | Description | Example Use Case |
---|---|---|
White (full opacity) | The mask starts as fully opaque (white), meaning the underlying layer is completely visible. | Starting with a fully visible image and gradually hiding parts with black paint. |
Black (full transparency) | The mask starts as fully transparent (black), meaning the underlying layer is completely hidden. | Starting with a hidden image and gradually revealing parts using white paint. |
Layer's alpha channel | The mask is based on the existing alpha channel (transparency) of the selected layer. | Directly using the transparency data of your layer as a starting mask. |
Layer's alpha channel (inverted) | The mask is based on the inverted alpha channel of the layer. | Inverting existing transparency of a layer for masking. |
Selection | The mask is based on the current selection. White for selected areas, black for non-selected areas. | Quickly masking based on a selection made with the selection tools. |
Grayscale copy of layer | The mask is a grayscale copy of the original layer, where brighter areas are more visible. | Using the luminosity of the layer as the basis for masking to blend with other layers. |
Grayscale copy of layer (inverted) | The mask is an inverted grayscale copy of the layer. | Inverting the luminosity information for specific masking effects. |
Transfer layer's alpha channel | Similar to "Layer's Alpha Channel", but it also moves the alpha channel data to the mask. | Transferring an existing transparency from your image to be used as a mask. |
Channel | Allows selecting an image channel as the source for the mask. | Using color channels (e.g., red, green, blue) as a basis for the mask. |
How Layer Masks Work
Layer masks work using a grayscale system.
- White: Fully reveals the layer.
- Black: Hides the layer.
- Grays: Creates partial transparency.
You can paint on the mask with grayscale colors to adjust how the layer is revealed or hidden.
Editing Your Layer Mask
- Once the layer mask is created, you can edit it directly with any of GIMP's painting tools.
- Make sure the layer mask thumbnail is active and not the layer thumbnail before you paint.
By using layer masks, you can make complex edits to your images with non-destructive techniques.