Understanding layer manipulation in GIMP will allow you to advance beyond simple photograph editing and into making pixel art and advanced photograph editing. Not necessary for many tasks that GIMP can be useful for, it is a good way to start making original graphics from your own imagination. This tutorial will try to demonstrate some of the ways that layers work in GIMP without the promise of a beautiful product when you get to the end of the demonstration. An xcf of each demonstration will be provided.
There are two menus. One is available through <Image>/Layer and the other is available through the layers dialog, <Layers>. Right click on the face of the dialog. The layers dialog has those buttons as well. Be sure to use the mouse to read the tooltips on the buttons in the dialog.
Only one layer can be active at one time. The active layer might not be the visible layer in the image window.
While the demonstration xcf is not the best to view layer visibility with, it is an opportunity to see what setting the Zoom percentage in the Image Window (located in the lower portion of the window, change 100% to 400% and the demonstration xcf becomes useful).
Use the mouse to click on the eyeball icon in the layers dialog. The image window shows the sum of all of the visible layers. If the first layer is solid (not transparent) it doesn't matter what the visiblity of the layers below it is.
A demonstration of how it works is not available through this web page yet. My apologies if you were clicking on the page images.
Layer mask menus can be found through the image menu
A masked layer is a layer with the addition of a grayscale cover. Where this cover or mask is black it will erase that area of the image associated with it, or make those parts transparent. Where the mask is white, the image associated with it will be opague. The grey parts are all of the percentages of opacity between 0% and 100%. When you start to use masks, the layers start to make sense. Using the eraser on the image area without the mask will have the same effect.
You can see how the mask and the layer work together in the default image window view.
When a layer has a mask attached to it, by default, anything you do to it will happen on the mask. If you apply a tool or if you use a filter it will work on the grayscaled mask part of this image.
If you left click on the image, then the focus changes and anything you do will happen to the image and not the mask. You can see if this has happened or not by the highlighting on around the thumbnail in the dialog.
The view in the image window does not change for this.
The the dialog to the left should look like the layers dialog with the thumbnail clicking and highlighting.
Activate the layer you want to add a mask to, right click on the Layers Dialog face and select Add Layer Mask.... A new dialog will present itself called "Add Layer Mask". There are many options in that dialog, I almost always use the default "full opacity".
The view in the image window should be unchanged.
Activate the layer that you would like to become the mask. <Image>/Edit/Copy on the image window.
Activate the layer that will get the mask. It will need to have the mask already present for this to work. Then <Image>/Edit/Paste on the image window. Touch the Anchor button on the Layers Dialog.
<Image>/Colors/Invert will make each color turn into its opposite color. I use this most often with grayscale images.
Not unlike quickmask but without all the hassle of having too dark of a shaded area -- with a reasonably sized white paint brush, you can "paint back some opacity" on your image. Use the brush on the mask and try to write your initial on the image.