How to make an image with transparent text on an opaque background?


Question

For my blog, I would like to create something like this logo:

ReadWrite logo

However, where the text on the image above is white, I would like to have a transparent hole instead, so that the background of the page would show through. How could I create something like that in GIMP?

1
2
10/27/2013 7:47:00 PM

Accepted Answer

There are several ways you could do that, but the obvious choice for me would be to use a layer mask.

First, make a layer filled with your desired color:

A blue rectangle

Next, use Layer → Mask → Add Layer Mask.. to add a fully opaque mask for the layer.

Then create the text or other shape you want to cut out from the image, e.g. some text, as black on white:

The word "TESTING" as black text on white

Finally, copy the text and paste it into the layer mask. Your color layer should now have a transparent text-shaped hole in it:

Transparent text on blue background

There are many other possible ways to achieve the same result, e.g. using Color to Alpha or just by selecting the text by color and cutting the resulting selection out of the color layer. The nice thing about layer masks, however, is that the mask and the content of the layer remain separately editable, allowing you to easily adjust them later.

4
10/27/2013 12:50:00 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow


Website under construction!!!
^