How to do Chroma Key in GIMP: A GIMP Tutorial on Changing a Photo Background

Chroma Key: The Way to Make a Virtual Background

Chroma key is the method by which photographers (and videographers) use a monochromatic backdrop, then replace the blue or green "screen" with a virtual background. This is the method employed during every evening weather broadcast: the newscaster is standing in front of a blank screen, but the viewers at home see a weather map.

Chroma key can also be used with photography. Subjects can be photographed in front of a monochromatic screen, and a virtual background can be placed behind the subject once the screen is removed. In the example below, a butterfly is photographed on a blue tarp, which is replaced by a Goldenrod flower.

When choosing an object for use in chroma key, it is important to verify the background "screen" color does not exist on the object. For example, choosing a blue background for a blue butterfly would be a poor choice: portions of the butterfly would be deleted along with the background.

In addition, it would be a good idea to become familiar with the basic GIMP functions before attempting this tutorial: a basic knowledge of the Layers dialog and toolbox items is necessary prior to attempting this photo editing technique.

Chroma Key Example (click to enlarge)
Chroma Key Example (click to enlarge)

Step 1: Open Photo, Add Alpha Channel

  1. Go to FILE and OPEN the image file which contains a monochromatic background.
  2. Go to the LAYER tab on top of the GIMP screen and select ADD ALPHA CHANNEL.
  3. Go to the WINDOWS tab on the top of the GIMP screen and select DOCKABLE DIALOGS. Choose LAYERS to open the Layers window.

Select and delete the background color.
Select and delete the background color.

Step 2: Select Color and Delete Color

  1. Go to the COLOR SELECT tool in the toolbox window. This is the icon with a hand pointing to a color panel.
  2. Select an area of the monochromatic background (in the case of the butterfly, this would be the blue tarp area). The general area will become shaded with blinking lines.
  3. Go to EDIT and select CUT. A large area of the background will disappear, leaving the gray checkered pattern in its wake.
  4. Continue to select the background and delete the color until the background is entirely gone.

The new background is placed, though out of scale with the object.
The new background is placed, though out of scale with the object.

Step 3: Create a New Layer and Paste New Background

  1. In the Layers window, select the small white rectangle in the lower left corner to CREATE a NEW LAYER. Select transparency as the layer type.
  2. Choose a photographic background: Go to FILE and OPEN the new image file.
  3. Go to EDIT and COPY the new background.
  4. Return to the original photograph and PASTE the background into the new layer (in the case of the example, this was an image of a Goldenrod flower).
  5. The pasted image will be "floating." While the pasted background is "floating," adjust the size of the background using the SCALE tool in the toolbox window.
  6. When the background is of suitable size and scale, click on the anchor icon in the Layers window to ANCHOR LAYER.
  7. The new background will completely cover up the original object. To place the object in front of the background, simply click on the GREEN ARROW to move the background layer down one level.

The final, adjusted image (click to enlarge).
The final, adjusted image (click to enlarge).

Step 4: Resize Objects and Save

  1. If the original object is out of scale with the background, simply select the layer and use the SCALE tool to adjust the size. In the case of the example, the butterfly was the object, and it had to be rescaled to fit on the Goldenrod flower.
  2. Use the MOVE tool to adjust the location of the object on the background.
  3. When the object and the background are appropriately sized and adjusted, go to FILE and select SAVE AS to save the file. GIMP will send a prompt to export the file: simply click OK and select 100% for the image quality. Save the file with an appropriate identifying name.

The original image.
The original image.

More by this Author


Comments 2 comments

49lart profile image

49lart 3 years ago from Edinburgh, Scotland

Excellent tutorial. Does it work on Elements 11?


leahlefler profile image

leahlefler 3 years ago from Western New York Author

I am not sure if the commands are the same in Photoshop, but the concept is the same. Simply delete the blue or green background and layer the object on a new background. I hope you are able to do this in PS Elements, 49lart!

    Sign in or sign up and post using a HubPages Network account.

    0 of 8192 characters used
    Post Comment

    No HTML is allowed in comments, but URLs will be hyperlinked. Comments are not for promoting your articles or other sites.


    Click to Rate This Article
    working