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

Combine 24-bit image and 8-bit alpha channel from separate file

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.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

Combine 24-bit image and 8-bit alpha channel from separate file Mirko Raner 23 Oct 04:16
  Combine 24-bit image and 8-bit alpha channel from separate file Joao S. O. Bueno Calligaris 23 Oct 08:49
Mirko Raner
2005-10-23 04:16:05 UTC (about 19 years ago)

Combine 24-bit image and 8-bit alpha channel from separate file

Hi all,

I have a problem for which i haven't found a solution in GIMP, but I'm sure there is some easy way to achieve this. I have a 24-bit image file and a separate 256-gray-level image of the same size. The gray-level image is supposed to act as the alpha channel for the 24-bit image. I managed to transfer the gray-level information into the alpha channel of the grey image, and then switched the image mode from 256 gray levels to full RGB. Then I just selected the other 24-bit image and copied and pasted it into the modified gray level image. My idea was that, as the original 24-bit image does not have an alpha channel, the copy/paste would transfer the R, G, and B channels but leave the alpha channel as it was. Unfortunately, pasting the other 24-bit image also replaced the contents of the alpha channel with a 100% opaque setting.
So, how can I apply a separate 8-bit gray-level image as the alpha channel for a 24-bit RGB image of the same size?

Thanks in advance,

Mirko

Joao S. O. Bueno Calligaris
2005-10-23 08:49:00 UTC (about 19 years ago)

Combine 24-bit image and 8-bit alpha channel from separate file

On Sunday 23 October 2005 12:16 am, Mirko Raner wrote:

Hi all,

I have a problem for which i haven't found a solution in GIMP, but I'm sure there is some easy way to achieve this. I have a 24-bit image file and a separate 256-gray-level image of the same size. The gray-level image is supposed to act as the alpha channel for the 24-bit image. I managed to transfer the gray-level information into the alpha channel of the grey image, and then switched the image mode from 256 gray levels to full RGB. Then I just selected the other 24-bit image and copied and pasted it into the modified gray level image. My idea was that, as the original 24-bit image does not have an alpha channel, the copy/paste would transfer the R, G, and B channels but leave the alpha channel as it was. Unfortunately, pasting the other 24-bit image also replaced the contents of the alpha channel with a 100% opaque setting. So, how can I apply a separate 8-bit gray-level image as the alpha channel for a 24-bit RGB image of the same size?

Thanks in advance,

Mirko

Indeed, there is an easy way!

You have to learn about layers (if you already had not) and masks - rightclick on alayer preview on the layer dialog - you will options for the mask - a layers masks acts roughly as a "second" alpha channel to it, but it is a separate drawable wich can be changed indepently of the layer itself.

FOr what you want: just add a mask for your RGB image, go to your grey image, edit->copy, go back to the RGB image, select the mask (it has to get a white border 1px border in the layers dialog), and paste.

JS
->