I'd like to have a layer mask in Gimp that includes some text. I currently have a method of achieving this, but it's a little more crude than I'd like.

In this image, the top text is a simple text layer sitting over a plain blue background. The bottom text is the result of the following procedure:

  1. Create a plain background and a separate text layer.

  2. In the layers dialog, right click on the text layer, and select, "Alpha to Selection".

  3. Hide the text layer, select the background layer, right click and select, "Add Layer Mask".

  4. In the resulting dialog, select to initialize the layer mask to "White (full opacity)"

  5. Selecting the 'Bucket Fill Tool' with the colour black, fill the selected area.

  6. In the layers dialog, right click the blue background layer, and select, "Apply Layer Mask".

  7. Create a new black background behind the blue layer.

Difference between original and masked text

The difference is small, but noticeable (especially since I scaled the image up to 500%). It does slightly change the look of a font.

It's perhaps more noticeable as a gif:

enter image description here

My question is, how can I add text to a layer mask without losing any of the fine details of the font?

1 Answer 1


I cannot see any difference if I use:

  • right click on text layer > alpha to selection
  • select background layer and press DEL

Same, if I use your way but use Ctrl + , to fill the text selection with black in the layer mask.

I just added a white area, so anyone can see it's a animated gif and it's working.

enter image description here

  • Wow, I'm flabbergasted. I just tested your alternate method myself, and found the same results! It's perfect. Thanks very much. It's such a small change in the process that I doubt I ever would have stumbled across it myself. Commented Apr 23, 2014 at 23:18
  • @WhiteHotLoveTiger Yep, Gimp can be laborious if you don't know some tricks. I'll appreciate an upvote :)
    – kelunik
    Commented Apr 23, 2014 at 23:23
  • I'd love to upvote you, but at the time I'm posting this, I'm 7 rep short of that privilege. :( Commented Apr 23, 2014 at 23:31
  • @WhiteHotLoveTiger Oh didn't notice that. If you're trusted user on one site, you get immediately 100 rep when you register on another.
    – kelunik
    Commented Apr 23, 2014 at 23:37
  • @kelunik Got you covered on that up vote. (^_-)=b Good answer.
    – jpheldson
    Commented Apr 24, 2014 at 0:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.