Picture Editing

Masks

Aims of learning Learning objectives


When you have completed this session, you should be able to

  • define term "mask",
  • create a mask.

Masks

Handling masks is a strong point of Gimp. Mask is a gray shaded picture having some influence on the picture. The mask is not seen in the picture only its effect is visible. The kind of influence the mask has on the picture defined by mask application.

Let us see this with an example. The mask should be used for defining which pixels to be selected and which ones not. Imagine a gray shaded picture with the same size as the one we are editing. In this picture only the different intensity of black color varieties (grays) are represented. Gimp will use this picture to define which pixels to be selected and which ones not. This is done the following way: The monochrome image (the mask) is placed exactly over the original image. Than each pixels of the mask is scanned through. Where the mask is black the pixel remains unselected where it is white that becomes selected. Gray pixels become partially selected according to the intensity of gray shades.

This idea is applied for other effects as well. For transparency for instance. Where the mask is black the original picture is transparent, where it is gray the original is semi-transparent, and finally where it is white the original one is non-transparent.

Actually Gimp uses masks for the selections and for the definitions of transparency. So these pieces of information are stored in the form of monochrome pictures. When a selection is made practically a mask is made (selection mask) thus usually only the influence is observed.

To display the transparent and non-transparent pixels of layers the program uses mask too. This is the transparency mask that belongs to the layers.

Some masks belong to a layer (transparency mask of the layer) and some have the effects on the entire picture (selection mask).

Transparency mask and quick mask mode

When a selection is done a mask is created. Can this mask be displayed? Can the mask directly be edited? The answer is certainly yes. This makes Gimp a great program.

Let us make a selection having the ellipse form and switch to quick mask mode with pressing the buttons SHIFT+Q.

In Quick Mask mode the selection mask is displayed. It is not displayed in monochrome picture but with some other appearance in order to have the original picture visible. The black parts of the mask appear in red. Gray points are displayed with lighter red having the same transparency. Where the red “veil” appears the picture is protected and masked.

Now, with the paintbrush and the eraser the mask can be re-drawn in any ways. If we switch back from quick mask mode (SHIFT+Q), we can see that Gimp displays properly the selected area.

With the selection mask the selected area can be edited very precisely. With this technique practically any sort of selection can be created without limitations.

Transparency mask

When non-transparent point of a layer are selected whether how does gimp realize which point are those? The answer is very simple. From the transparency mask. The transparency mask is used for the selection and creates a selection mask from it.

With the exception of the background layer for all layers a transparency mask is created. The program creates them without receiving such command.

What should we do if we intend to further modify the transparency of the layer? There is a way o do so. We can create for all layers their own transparency mask.

Creating individual transparency layer

Beside Gimp’s automatically created transparency mask an individual mask can be created for each layers.

To do this, activate the layer and click on Add Layer Mask command in the Mask menu point of Layer menu. The color of the newly created mask can be adjusted in the dialogue window. It is recommended to choose white for the beginning. The image box of layer mask appears next to the layer’s image box.

From now on mask and layer can be edited depending on which view image we click on. If we chose the mask’s view image the mask is active. We can draw on the mask blind because the effect can be seen only in the small view image; not in the drawing.

Can we help on this? Yes, of course. The mask can be displayed in monochrome mode.

For monochrome display click on the mask’s image box while pressing ALT. Switching back is the same. A small green frame appears around the layer mask’s view image when we are use monochrome view.

Do not forget that using gray color on the mask results semi-transparency. This can be used for creating castings.