Daniel Veazey
  • Home
  • About
  • Contact
  • What People Are Saying
Follow

Gimp Layer Mask

Aug01
2010
10 Comments Written by Daniel Veazey

NOTICE: I have posted a new tutorial explaining the basics of layer masks. Check it out here.

Here is a way to use layer masks and the paths tool to merge parts of two photos into one composite image. We’ll start by taking two photos of a television, using a tripod to keep the position of the camera exactly the same. We won’t use a flash, so the first photo will have a slower shutter speed to get the correct exposure on everything around the TV. However, this makes the image showing on the TV way overexposed and blown out. So we’ll take a second photo with a much faster shutter speed to get the correct exposure on the screen.

We will use Gimp to put these two photos together. We’ll open both photos as layers. You can click on File -> Open as Layers, or you can press Ctrl-Alt-O. On the layers palette, we’ll name the two layers “screen” and “room.”

Even though I used a tripod, my two photos don’t line up exactly, so I’ll need to correct that.

I put the screen layer above the room layer and set it to a low opacity. Then I used the move tool to get it lined up correctly.

Now I reset the opacity on the screen layer to 100% and move that layer below the room layer.

Right-click on the top layer and choose “Add layer mask.” In the box that pops up, choose to fill it with White (full opacity). On the layers palette, you’ll see a small white box next to the thumbnail of the top layer, and it will have a white border around it to indicate that it is the part of the layer you are now working with.

Here is some information about layer masks, from the Gimp documentation:

A transparency mask can be added to each layer, it’s called Layer mask. A layer mask has the same size and same pixel number as the layer to which it is attached. Every pixel of the mask can then be coupled with a pixel at the same location in the layer. The mask is a set of pixels in gray-tone on a value scale from 0 to 255. The pixels with a value 0 are black and give a full transparency to the coupled pixel in the layer. The pixels with a value 255 are white and give a full opacity to the coupled pixel in the layer.

Use the paths tool to draw around the edges of the screen. My tutorial on how to use the paths tool can be found here. Make sure you get the path right along the edge of the screen. It doesn’t hurt to get some outside the screen, but you want to make sure the blown out image is completely within the path you’re drawing. Then in the tool dialogue, click the “Selection from path” button.

Choose the paint bucket tool and make sure the foreground color is black. Click once inside the selection border. This fills the selection with black. But because we’re working on the layer mask, it simply makes everything on that layer, in that selection, invisible. So the image on the layer below now becomes visible through the “hole” we created in the layer mask above it.

Now we can flatten our image under the Image menu, and there we have our composite image with the correct exposure for both the TV screen and the areas around it.

Be Sociable, Share!
  • Tweet

Related posts:

  1. Everything You Need to Know About Gimp Layer Masks
  2. Gimp Tutorial: Super Groovy Wallpaper Part 2
  3. The best way to make a vignette in Gimp
  4. Tilt-shift simulation in Gimp
  5. Using High Pass Filter To Sharpen Images In Gimp
Posted in Gimp, Photography - Tagged Gimp, layer mask, paths tool, Photography
SHARE THIS Twitter Facebook Delicious StumbleUpon E-mail
← Using keyframes in Kdenlive
Building a “Fish Attractor” →

9 Comments

  1. Alexander Barkoff's Gravatar Alexander Barkoff
    August 1, 2010 at 2:27 pm | Permalink

    how does this translate to Photoshop?? I am not familiar with Gimp but is the process similar in CS2?
    Thanks,
    Alex

  2. Daniel Veazey's Gravatar Daniel Veazey
    August 1, 2010 at 2:31 pm | Permalink

    I haven’t used Photoshop in a long time but, from what I remember, I think the steps would be very similar.

  3. Lillian's Gravatar Lillian
    November 14, 2010 at 2:13 am | Permalink

    Thanks! I wasn’t really look for this but it showed me something I would not have known if I hadn’t seen this. Thanks!

  4. Daniel Veazey's Gravatar Daniel Veazey
    November 14, 2010 at 11:56 am | Permalink

    Glad I could help :)

  5. conipopescu's Gravatar conipopescu
    January 30, 2011 at 11:32 am | Permalink

    Thanks, this helps me understand how layer mask works.I was having trouble with the mask tool.

  6. Daniel Veazey's Gravatar Daniel Veazey
    August 20, 2011 at 8:44 am | Permalink

    Thanks for commenting. :)

  7. GL's Gravatar GL
    January 22, 2012 at 12:42 pm | Permalink

    Thanks for the tutorial, I’m new to GIMP, so please forgive me if I’m asking stupid questions.
    Why is it necessary to create a layer mask to the layer? Will I achieve the same result by just doing the path selection and delete the inside area on the main layer so that the second layer underneath can be visible?

    Thanks!!

  8. Daniel Veazey's Gravatar Daniel Veazey
    January 22, 2012 at 12:52 pm | Permalink

    Yes, you could do that and it would work fine. One point of using a layer mask is to preserve the part of the image that you’re masking, in case you want to change it later. One of the great things about GIMP is that there is always more than one way to do something. Thanks for leaving a comment.

  9. Shaun's Gravatar Shaun
    April 20, 2012 at 5:21 am | Permalink

    Very helpful in making me understand the concept of layer masking. Thanks much.

  1. My Japanese Life (assemblage) « Serenblip's Blog on July 26, 2011 at 9:55 am

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Categories

  • Activities
  • Audacity
  • Books
  • Film reviews
  • Free stuff
  • Gadgetry
  • Gimp
  • Inkscape
  • Jokes
  • Kdenlive
  • Linux
  • Music
  • Photography
  • Python
  • Quotes
  • Ukulele
  • Videos
  • WordPress

Why you should leave a comment

1. I read all the comments.
2. I reply and answer every question.
3. I always click through to see the sites of commentators.
4. Because you can.
5. You become a participant instead of just an observer.

Pictures I took

DSC_0180 DSC_0152 DSC_0137 Elk Closer DSC_0144 DSC_0184 DSC_0174 Dog Spreading The Good Word dsc_9485 DSC_0164

Blogroll

  • A Life Ended Here
  • Arthur Reeder
  • Barrel House Marketing Group
  • Central Arkansas Innovative Alliance
  • Digital Photography School
  • Fazed
  • Freedom Feens Podcast
  • Full Circle Magazine
  • heathenx.org
  • John LeMasney
  • Libertarian Punk
  • Mitch Canter
  • Ozarks Unbound
  • radio free python
  • Ronnie Tucker
  • Tammy Hart Designs
  • The Agitator
  • Ubunite
  • Ubuntu
  • WordCamp Fayetteville
  • WP Beginner

EvoLve theme by Theme4Press  •  Powered by WordPress Daniel Veazey
Things I find interesting