GIMP Layer MaskA step by step tutorial on how to create a layer mask in GIMP.  You can use a layer mask to remove, change or make abackground transparent.

The first step to successfully replacing or swapping out an image background in GIMP, especially one with a lot of fine detail, is to create a layer mask.

In this tutorial, we will learn how to create a layer mask for use in masking the background in order to change or alter said background.  This masking technique does require some time to complete, however, the results are quite professional.  If you’ve ever tried to remove or alter an image background, you’ve doubtless had some issues doing a clean selection of the image subject – especially around hair, folds or areas with a lot of fine detail.  A good layer mask will allow you to retain fine detail, such as hair, folds in clothing and particles.

Let’s get to it!

  1. Launch GIMP and open your image.  For this tutorial, wewill be using this photo: bg_1.jpg.
    GIMP Layer Mask 1
  2. From the GIMP main menu, select “Colors>Components>Decompose”.
    GIMP Layer Mask 2
  3. From the “Decompose” window that pops up, select “RGB” for Color model and “Decompose to layers”.  Click “OK”.
    GIMP Layer Mask 3
  4. From the Layers Panel on the right, right-click the “red” layer and select “Delete Layer”.  Do the same for the “blue” layer.
    GIMP Layer Mask 4
  5. When you are done, you should be left with only the “green” layer.
    GIMP Layer Mask 6
  6. From the Toolbox Panel on the left, select the “Free Select Tool”, otherwise known as the lasso.
    GIMP Layer Mask 7
  7. To use the Free Select Tool, simply press and hold the left mouse button and trace a contour around the area you wish to select.  In this case, we want to select the subject of the photo.  Be careful not to get too close – we want to avoid accidentally cutting details from our selection.  When you are done, it should look like this:
    GIMP Layer Mask 8
  8. Now that we have selected our subject, we want to invert our selection in order to allow us to fill the background (area surrounding our subject) with black.  To invert your selection, use “Select>Invert” or Ctlr+I.
    GIMP Layer Mask 9
  9. From the Toolbox Panel on the left, select the “Bucket Fill Tool” and in the Bucket Fill properties below, select “Fill Whole Selection”.  Make sure your fill color is black.
    GIMP Layer Mask 10
  10. Click once in the background area of your photo to fill it with black.
    GIMP Layer Mask 11
  11. Now we need to undo our selection.  To remove it, “Select>None” or Ctrl+Shift+A.
    GIMP Layer Mask 12
  12. From the GIMP main menu select, “Colors>Threshold”.
    GIMP Layer Mask 13
  13. Using the slider in the “Threshold” window, tweak your threshold in order to obtain a fairly strong white outline.  We will clean this up with our Brush Tool afterwards.  Click “OK”.
    GIMP Layer Mask 14
  14. Now we are going to clean up our background before proceeding to filling our subject.  To clean up our background, from the Toolbox Panel on the left, select the “Brush Tool”.  From the properties section below, make sure “Opacity is set to 100% and use the “Scale” slider to scale your brush size up or down whenever needed.  Also make sure that your foreground color is black (same as background fill).
    GIMP Layer Mask 15
  15. Increase your zoom to 200% or 400%, using the zoom  drop down on the bottom left.

    GIMP Layer Mask 16
  16. Scroll over your photo and brush over any small white areas that don’t belong to the subject.  Everything you paint over in black will be masked when we apply it to our original photo.
    GIMP Layer Mask 17
  17. When you are done, it should look like this:
    GIMP Layer Mask 18
  18. Now, we change our brush color to white and fill over the entire area of our subject with the “Paintbrush Tool”.  Once done, it should look like this:
    GIMP Layer Mask 19
  19. This is your completed mask.  We will use this as a layer mask in our next tutorial: GIMP – How to remove or alter an image background.  You should save this file.

Are you looking for a quicker, easier way to learn how to use GIMP for photo editing, photo effects and custom graphics? For 35 GIMP Video Tutorials - Click Here!

-OR-

Check out these excellent GIMP books

Tags:     gimp layer mask      gimp layers      gimp remove background

Brought to you by dodisdodat.com! All Rights Reserved © 2010-2011!

ad_logo



blog comments powered by Disqus


Share This Article! Share This Article!

Follow Us

facebook-128twitter-128youtube-128rss-128

Contact Us

Do you have any questions, suggestions, requests or simply want to leave us some feedback?
Send us a quick message!