How to fade two images together in Gimp


I have two pictures of irregular shape with transparent background and a background image.

How can I join these two pictures to make them fade with each other, but not with the background image?

7/14/2013 8:26:00 PM

Accepted Answer

Given you have an image with three layers, the background layer and your two objects each in its own layer on top of it, you can do the following:

  1. Add a layer mask to each of the two object layers and select Layer's Alpha Channel in the Add Layer Mask dialogue.
  2. Select Show Layer Mask in the layer context menu and copy the mask by doing select all and copy in the main window with the respective layer selected in the layers window.

    You should now have two layers containing just the content of the two layer masks. You might have to use the align tool to get the layer mask copies back on top of their respective layers.

  3. Combine the layer mask layers with the Lighten Only blend mode and merge them.

  4. Remove the layer masks from the two object layers and set them both to 50% opacity. Merge these two, as well.

  5. Now create a new layer mask for this new layer (it's pretty much irrelevant what you initialise it with this time).

  6. Show the layer mask, copy the layer with the two merged layer masks and use paste into or aligning again to get a new floating layer right on top of the layer with the two objects.

  7. Anchor it to make it its new layer mask (this could probably be done with channels more elegantly but I'm not familiar with those anymore).

Now you should be able to hide the layer mask in the popup menu again and see the final result you desired. Good luck!

Oh and if there's an easier way to do this seemingly simple task of crossfading two layers, I'd also be interested to know.

7/14/2013 8:23:00 PM