Union and Intersect Masks in GIMP Selection Editor

The Selection Editor dock in GIMP provides a dedicated real-time preview of the active selection mask, allowing you to visually monitor and manage complex selection boundaries. By combining layer alpha channels with boolean operations—specifically union (adding) and intersection (retaining overlapping areas)—you can merge multiple transparency masks into a unified mask for composite editing or channel storage.

Step 1: Open the Selection Editor Dock

  1. Open your project in GIMP containing the layers with the alpha channels you want to combine.
  2. In the top menu, go to Windows > Dockable Dialogs > Selection Editor.
  3. Position the newly opened dock where it is clearly visible. This window renders your active selection as a black-and-white mask, where white represents fully selected pixels, black represents unselected pixels, and gray represents partial transparency (feathering/semi-transparent alpha).

Step 2: Load the Base Alpha Mask

  1. Navigate to the Layers panel.
  2. Right-click the layer containing your first alpha mask.
  3. Select Transparency > Alpha to Selection.
  4. The Selection Editor dock will instantly display the alpha channel of that layer as a white silhouette on a black background.

Step 3: Perform a Union Operation (Add)

A union combines all opaque and semi-opaque regions from both layers, creating an inclusive mask.

  1. Keep your initial selection active.
  2. In the Layers panel, locate the second layer containing the alpha mask you wish to merge.
  3. Right-click the second layer and navigate to Transparency > Add to Selection (or hold Shift and drag/click the layer's thumbnail, depending on your shortcut configuration).
  4. Observe the Selection Editor dock. The preview updates immediately to show the combined shape of both alpha channels, representing the logical union.

Step 4: Perform an Intersection Operation

An intersection isolates only the areas where both layers share opacity, discarding regions that exist in only one layer.

  1. Reload your initial alpha mask by right-clicking the first layer and choosing Transparency > Alpha to Selection.
  2. Locate the second layer in the Layers panel.
  3. Right-click the second layer and navigate to Transparency > Intersect with Selection (or hold Ctrl + Shift and click the layer's thumbnail).
  4. Observe the Selection Editor dock. The white area shrinks to display strictly the overlapping regions shared by both layers.

Step 5: Save and Apply the Resulting Mask

Once your union or intersection is visible in the Selection Editor dock:

  • Save as a Channel: Click the Save to Channel button (the channel icon) at the bottom right of the Selection Editor dock to preserve the resulting mask for later use in the Channels dialog.
  • Apply as a Layer Mask: Select your target layer, right-click it in the Layers panel, choose Add Layer Mask, select Selection in the prompt, and click Add. The combined alpha logic will now govern the layer's opacity.