RSS/Atom feed Twitter
Site is read-only, email is disabled

Opacity Layers?

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

Opacity Layers? David Wright 10 Apr 01:37
  Opacity Layers? Michael Schumacher 10 Apr 02:15
  Opacity Layers? Steve Stavropoulos 15 Apr 20:58
David Wright
2004-04-10 01:37:02 UTC (about 20 years ago)

Opacity Layers?

Does the gimp support opacity layers? By opacity layer I mean an layer with a 8-bit numer for each pixel, where instead of being intrepreted as a gray or color intensity value, the number is intrepreted as a pure opacity. When it is 255, the pixel is black; when it is 0, the pixel below shows through perfectly; when it is intermediate, the pixel is an appropriate average of black and the color of the pixel below.

Assuming such a layer exists, how can I transform a grayscale layer into an opacity layer?

This problem arises because I have scanned penciled text on white paper into a single-layer grayscale image. I want to use the gimp to make that text appear over another image. I have already tried (1) making a single color transparent and (2) using the magic wand to "partially" select the text. These solutions all have the problem that some of the color of the original background "leaks" into the final image near the text. That's why I want to use the intensity values of the original purely to measure opacity, not to communicate any color information at all. How can I do this?

I did google on this, but wasn't able to find a solution. Please help if you can. Thanks!

Michael Schumacher
2004-04-10 02:15:31 UTC (about 20 years ago)

Opacity Layers?

David Wright wrote:

Does the gimp support opacity layers? By opacity layer I mean an layer with a 8-bit numer for each pixel, where instead of being intrepreted as a gray or color intensity value, the number is intrepreted as a pure opacity. When it is 255, the pixel is black; when it is 0, the pixel below shows through perfectly; when it is intermediate, the pixel is an appropriate average of black and the color of the pixel below.

Assuming such a layer exists, how can I transform a grayscale layer into an opacity layer?

This sounds like you want layer masks or layer modes. But you probably won't need them here.

This problem arises because I have scanned penciled text on white paper into a single-layer grayscale image. I want to use the gimp to make that text appear over another image. I have already tried (1) making a single color transparent and (2) using the magic wand to "partially" select the text. These solutions all have the problem that some of the color of the original background "leaks" into the final image near the text. That's why I want to use the intensity values of the original purely to measure opacity, not to communicate any color information at all. How can I do this?

Try Filters->Colors->Color To Alpha

HTH, Michael

Steve Stavropoulos
2004-04-15 20:58:10 UTC (about 20 years ago)

Opacity Layers?

On Fri, 9 Apr 2004, David Wright wrote:

Does the gimp support opacity layers? By opacity layer I mean an layer with a 8-bit numer for each pixel, where instead of being intrepreted as a gray or color intensity value, the number is intrepreted as a pure opacity. When it is 255, the pixel is black; when it is 0, the pixel below shows through perfectly; when it is intermediate, the pixel is an appropriate average of black and the color of the pixel below.

What you want to create is a layer with the alpha channel representing your image and a solid color (black or white in your case). Simple steps:
1) Create a new white layer
2) Add layer mask (Black, full transparency) 3) select the layer with your text and in the image press ctrl-a and ctrl-c to select all and copy the image. 4) Select the layer mask in the layers dialog and in the image press ctrl-v to paste.
5) Anchor layer
6) The layer you just created is what you want. (you may like to right click in the layer and "Apply layer mask")

I just confirmed these steps in my gimp 1.2.1 but I think there isn't any difference in gimp 2.0.x.

PS. If you want to use this image in a web page notice that IE doesn't support 8-bit transparent pngs. (there are some workarounds that you can find in the archives of this list, but nobody should care about IE :P)