Department of Engineering

IT Services

Blending with GIMP

Sometimes you want to blend 2 overlapping images. The images may overlap completely, as here where the image of a punched card fades out from left to right, and an image of an ipod fades out from right to left. Layer Masks and Gradient Tools are used.
A Layer Mask is an extra "layer" that can be used to change the appearance of underlying layer. Making changes this way is tidy because the underlaying layer isn't changed - disabling the Layer Mask restores the look of the underlying layer.
The Gradient Tool is a way to fill an area with a gradually more intense color. The graduation can be simple (from left to right, for example) or one of many more complex patterns available. I'll use the 2 images below to demonstrate the method with fully overlapping images

Method

  • Download the images (click on them using the right mouse button and do a "Save Image As ...")
  • Start gimp and create a new image the same size as the initial images (in this case 320x240)
  • Load the images in using the Open as layers option in the File menu so that you get one image per layer. Note that each layer has a slider bar to control opacity. Sometimes you can blend 2 layers by setting the layers' opacity to 50% but it doesn't work well in this case
  • In the "Layers" window right-click on the thumbnail of the snail image to add a layer mask (full opacity). Do the same for the brain image. You should now have a Layers window like the one on the right.
  • Select the snail's layer mask by clicking on it (it's the white rectangle beside the snail thumbnail). Choose the Tools/Paint tools/Blend menu option. The pointer should change when it's in the main window. Click half way down the right edge and drag horizontally until you reach the left edge. Then release. This should produce a layer mask that gets lighter the further right you go. This mask controls the transparency of the layer (the blacker the mask, the more transparent it is).
  • Do the same for the brain's layer mask, except this time drag the gradient from left to right.
  • You should end up with something like this . You could tidy this up by erasing the ghosts. Before you save as JPEG you first need to collapse it to a single layer using the Image/Flatten Image menu item.

Note that the width of the blended area needn't be the full width of the window, and you needn't have a smooth, linear transition.

Another example is in the Gimp Advanced Guide