Invert Selected Region of a Layer Mask in GIMP
In GIMP, modifying a specific section of a layer mask without altering the underlying image requires targeting the mask as the active drawable. This guide details how to make an isolated selection on a layer mask and invert its grayscale values using the Color Invert command, ensuring the layer's source pixels remain completely unaffected.
Step 1: Activate the Layer Mask
Before making changes, you must ensure you are editing the mask rather than the layer's image pixels.
- Open the Layers dialog
(
Ctrl + L). - Locate the layer containing the mask.
- Click directly on the layer mask thumbnail (the black-and-white preview to the right of the image thumbnail).
- A white or green outline will appear around the mask thumbnail, confirming it is the currently active drawable.
Step 2: Define the Selection
Use any standard selection tool to isolate the area of the mask you wish to invert:
- Choose a tool such as the Rectangle Select Tool
(
R), Ellipse Select Tool (E), or Free Select Tool (F). - Draw the selection boundary directly on your canvas over the region you want to alter.
Step 3: Invert the Mask Values
With the layer mask active and your selection defined, apply the inversion:
- Navigate to the top menu and select Colors.
- Click Invert (or Linear Invert).
Because the layer mask is the active target, GIMP inverts only the grayscale values (turning white to black, and black to white) within the selected boundary. The pixel data of the actual image remains completely untouched.
Step 4: Finalize the Edit
- Clear the selection by going to Select >
None (
Ctrl + Shift + A). - Click on the layer's main image thumbnail in the Layers dialog to exit mask editing mode and return to standard image manipulation.