Take your photography to the next level and beyond...

  • NEWS

Why not join for free today?

Join for Free

Your total photography experience starts here

Layer Masks in GIMP and Paint Shop Pro X2

Layer Masks in GIMP and Paint Shop Pro X2 - Michael Bates shows us how to use layer masks in GIMP.

 Add Comment


Layer Masks in GIMPA very important facet of image editing is the ability to use layer masks properly, so a good understanding of this function is crucial before you start doing anything. Here I'll show you how to use a Layer Mask to remove areas of an image before bringing areas back. This should mean that once you have learnt how to do this you will be able to avoid using the eraser tool in future, meaning that your editing can be non-destructive from now on. For Elements users there is no equivalent feature available for you, though there are methods that emulate this tool that can be found using a quick search on the web.Opening images you want to work with

Step 1. Open the image you want to work with; I'm pasting a fish into this eye (it won't look at all believable by the time I'm done with it but you will learn how to use layer masks from it) so I'm opening the eye. Then open the other image with GIMP/PSP as well so that you have two active windows with images in.

Step 2a. Go to the image you want to cut out and press Control and ‘A' to select all, then Control and ‘C' to copy it. Move over to your equivalent of this eye image and press Control and ‘V' to paste it into the image. You can close the fish window now, we won't be needing that image again.

Cutting out an image
Creating a new layer in GIMP

Step 2b. This step is purely for GIMP users; in the Layers panel there will be a new layer called ‘Floating Selection (Pasted Selection)' where there should be a proper raster layer specially for your pasted image. To keep things tidy and make sure it remains its own layer, right-click it and select ‘New Layer'.

Pasted selection in GIMPStep 3a. Now we need to split into two different methods. Firstly we will deal with the GIMP approach to layer masks, which is modelled on the Photoshop method and as such is exactly the same. Right-click the pasted layer and select ‘Add Layer Mask' and keep the options at their default settings in the window that pops up, clicking OK to put the mask in place. There won't be any immediate effect, but a second thumbnail should open in the pasted layer that will have a white area where the image is showing and a black area over any empty areas.

Layers in GIMPStep 3b. In Paint Shop Pro style applications the process is slightly different although the principle remains the same. You right-click the same layer and select New Mask Layer>Show All. This will make the layer you are currently working with into a group; the top layer of the group is the combined thumbnail showing the group as it appears in the final image, whilst each layer within the group is shown with its own thumbnail. The mask layer will appear all white, and the old image will appear as it was. The group can be collapsed and expanded by clicking on the plus side connected to the bracket surrounding the images and in more elaborate projects it is possible to have groups within groups, but for now this is as complex as things will get.

Step 4. In both styles of software you need to click the layer mask to make it active (in GIMP et al just click on the thumbnail, and in PSP it acts pretty much as its own layer, so just left click that). Now that we are in the mask layer we need a simple understanding of it. The way these work is that you paint or fill it with a greyscale colour and the darker it is the more transparent it makes the image appear, with black being completely invisible and white being fully opaque. You can use any tool to fill these, including gradient fills, but here we'll just use the Paintbrush (in Gimp that's ‘P' and in Paint Shop Pro use ‘B').Soften the edges of layers in GIMP

Step 5. Once you have equipped the paintbrush it is generally best to soften the edge when you are working with layer masks to create less contrast between the new layer and the original image. In GIMP you do this by selecting a brush tip that has a soft edge in the tools panel, and in Paint Shop Pro this is done by changing the Hardness in the contextual toolbar across the top of the workspace. Once you have done this you can paint around the image so that only the actual object is visible and the background is hidden.

Step 6. Once you have removed the background you can then think about the image and remove any areas that are overlapping things you want to show through. Here part of my fish is obscuring the eyelid, and since I want the fish inside the eye I'm going to have to remove this area.

Step 7. If you remove some of your pasted layer you want to retrieve (as I did here) you can recreate that area of the picture quickly and easily. This is where Layer Masking is superior to removing areas of the image using the eraser; it can easily be undone at any stage, all you have to do is paint that area of the mask white once again and it should reappear. In GIMP you do this by pressing ‘X' to swap your background and foreground colour and painting your image and in PSP simply paint using the right mouse button to use your background colour.

Removing overlapping areas of an image
Undo mistakes in GIMP

Step 8. Once you have removed the surrounding areas of your pasted layer you should have a decent understanding of Layer Masks, though there is one more thing to learn. If you want your image fading into view then you need to set your paintbrush to a dark grey and paint the outer edges, then move gradually inwards using progressively lighter shades of grey until you are at white once again. Here you can see what the layer mask is actually painted in mine and how it relates to the final representation of the layer in my image. There you have it, you are not ready to start looking at more ambitious raster editing projects now that you can use layer masks properly, as these truly are one of the most versatile and important methods of editing an image available.

Final image in Layers tutorial in GIMP
Join ePHOTOzine and remove these ads.

Explore More

There are no comments here! Be the first!

Sign In

You must be a member to leave a comment.

ePHOTOzine, the web's friendliest photography community.

Join For Free

Upload photos, chat with photographers, win prizes and much more.