If the current selection represents the subject but the new mask reveals the background instead, enable Invert Mask in GIMP’s Add Layer Masks dialog when creating the mask. GIMP’s Selection initialization makes selected areas opaque and unselected areas transparent; inversion swaps those mask values. If the selection already represents the background, leave inversion off when your goal is to reveal the subject and hide the background. In either case, inversion changes mask polarity, not the selection’s shape or accuracy.
Decide what the selection represents
Before adding the mask, identify which area has the selection boundary: is it the subject you want visible, or the background you want hidden? Do not infer this from the marching-ants outline alone; it marks a boundary and does not tell you whether the enclosed or surrounding region is selected. Confirm the selection’s meaning using the image and the intended result.
For GIMP’s Selection initialization, selected pixels become opaque in the mask and unselected pixels transparent. A white mask area keeps the layer visible; a black area hides it. If your selection is the subject, that default direction matches the goal. If your selection is the background, it produces the opposite result, so inversion may be appropriate.
Create the mask with the intended polarity
- Select the layer that should be revealed over the subject and hidden over the background. Confirm that the active selection covers the intended region.
- Open Layer → Mask → Add Layer Masks…. You can also use Add Layer Masks… from the Layers dialog’s context menu or its bottom button.
- Choose Selection as the initialization method. Check whether your current selection represents the subject or the background.
- Set Invert Mask according to the desired mapping: with a subject selection, leave it off to reveal the subject; with a background selection, turn it on to reveal the unselected subject.
- Click Add, then inspect the new mask thumbnail beside the layer thumbnail in the Layers dialog.
This decision is about the initial mask. If you already created a mask, changing the setting in a new-mask dialog does not alter that existing mask; inspect the current mask and use an appropriate mask-editing action instead.
Check both regions
The table uses a hypothetical cutout in which the selection cleanly covers the subject. It predicts the polarity implied by GIMP’s documented initialization behavior; it is not a report of a software test. “Visible” means the layer remains opaque there, assuming no other transparency affects it.
| Selection represents | Invert Mask | Subject result | Background result | Polarity matches goal? |
|---|---|---|---|---|
| Subject | Off | Visible | Hidden | Yes |
| Subject | On | Hidden | Visible | No |
| Background | Off | Hidden | Visible | No |
| Background | On | Visible | Hidden | Yes |
After adding the mask, check the subject and background independently against the intended outcome. Also inspect the mask’s grayscale direction: the subject should correspond to lighter, more opaque mask values, and the background to darker, more transparent values. At a soft or partially selected edge, expect intermediate gray values rather than a perfectly black-and-white boundary.
If the result is still wrong
First distinguish a polarity error from a selection error. If the subject and background are consistently swapped across the image, the mask may have the wrong polarity. If parts of the subject and background are both wrong, or the edge follows the wrong shape, inversion will not repair the selected region. Revisit the selection and its boundary, then initialize a mask from the corrected selection with the appropriate inversion setting.
If only the edge looks wrong, inspect the grayscale transition and any partially selected areas. GIMP notes that a selection can include partial values; its Quick Mask can help preview their effect before creating the layer mask. Do not assume that inversion will make a rough edge more accurate: it exchanges mask values, including gray edge values, without changing where the selection lies.
The Add Layer Masks dialog also offers initialization choices such as white, black, alpha channel, grayscale copy, and channel. Those choices determine the mask’s starting content; they are not substitutes for correcting an incorrectly shaped selection. The documentation explains what Invert Mask does to the resulting mask, but does not promise a particular automatic correction for selection geometry.
Common questions
Should I invert when the subject is selected? Usually not for the goal “subject visible, background hidden.” Selection initialization already makes selected areas opaque. Turn inversion on only if you intentionally want the opposite mapping.
Should I invert when the background is selected? For “subject visible, background hidden,” inversion is appropriate: it swaps the background selection’s opaque area with the unselected subject area.
Does Invert Mask fix an inaccurate selection? No. It swaps opaque and transparent mask values, including partially transparent values. It does not move the selection boundary or identify the subject for you.
Sources
The selection, mask, and dialog behavior described here follows the linked GIMP documentation. The cutout table is a hypothetical polarity check, not a claim of application testing.
Sources and next step
This guide interprets public documentation and uses explicitly hypothetical acceptance examples, not application tests. Controls and availability can change; verify the cited manual against your installed version.
For work created in Imagild, carry the input requirements and acceptance checklist into the photo editor. The external software controls discussed above belong to their respective products.