Michael J. Hammel writes:
> On Mon, 2007-02-12 at 23:50 -0800, "Germain Le Chapelain"
> > I would like to know who to copy the alpha channel of an image to
> > another image.
> 1. Merge visible layers of the source image.
> 2. Copy visible layer of source image
> 3. Create new image for destination (as in File->New).
> 4. Add a layer to destination image
> 5. Delete background layer in destination image
> 6. Add black layer mask to only layer left in destination image.
> 7. Make black layer mask active drawable.
> 8. Paste into destination image.
> 9. Anchor to active drawable (re: mask).
> 10. Apply layer mask.

That doesn't quite work for me, because the contents of the source
image get applied to the layer mask too (where the source image was
blue but opaque, the destination won't be fully opaque).

But you can fix that by adding two steps: between steps 1 and 2,
turn on Keep Transparency (checkbox in the Layers dialog, called
Lock in 2.3) for the source image, then fill the source image with
white. Then copy, and what you paste later into the dest image's
layer mask will reflect only the alpha channel of the original.

(Don't get too put off by the number of steps. I skipped steps 4 and
5, but I was only using single layer images; maybe they're important
for the general case. And I skipped step 7 because it happens
automatically from step 6.)

This doesn't actually give you an image with an alpha channel, as
the OP asked; it gives you a layer with a layer mask that mimics the
original image's alpha channel. But "Merge visible layers" will turn
that layer mask into an alpha channel if you care about the difference.

    "Beginning GIMP: From Novice to Professional": http://gimpbook.com
Gimp-user mailing list

Reply via email to