In this tutorial we will study the basic use of the Alpha map editor. The alpha map (or layer mask) is a built in feature of the layers. For first, load an image and apply it a style (e.g.: Random Painter followed by an Emboss filter). To create a mask right-click the layer with the applied styles from the layer context menu.Select Edit alpha map.
This action will open a bitmap editor, restricted to work only with black and white "colors" (and anything between, using brush opacity). The initial mask is preset to be completely opaque (as your image was before you created the mask).
This is represented as white and you can put more or less transparent holes in it using black. Of course you can invert the whole mask with a toolbar button if you prefer to start with a transparent image. The rectangle fill tool is also handy when working with masks. "Draw" rectangles on the parts you want transparent. The half-filled black rectangle will be the transparent part.
We choose to make transparent the eyes and the mouth of the girl so that we will be able to paint these parts with a different, smaller brush than the rest of the portrait. The result of our masking is:
When you come back to compositing you can see your mask in the layer with a small thumbnail between the layer's name and thumbnail.
Add a Default layer below the edited to see how the Alpha map editing works.
You can also temporarily disable or remove the Alpha map using the layer context menu: right-click and select Disable Alpha map or Remove Alpha map.
When you disable it, a red cross appears on the Alpha map editor thumbnail in the context layer menu. The image in the viewport is updated.
Note: Disabling the Alpha map editor differs from Removing it! In fact, when disabled, the Alpha map editor can be enabled again. On the contrary, if the Alpha map Editor is removed, it can not be re-established, but should be recreated.