Extract an Image in GIMP

Extracting is the process of cutting out an object from its background. This is an important skill to learn for those who wish to enter any career using an image editing program such as GIMP. While most people use Photoshop, GIMP is a great open source alternative for those who can't afford or dislike Photoshop. This article will teach you how to use GIMP to extract an image.

Steps

  1. Open your image. There is no required format, but .xcf (GIMP file) is recommended. However, you may use a .jpg, .gif, .png, or any editable image file. We used this image, for example.
  2. Select the path tool from the menu. This is the tool this tutorial will be using.
  3. Begin putting anchors around your image. Each anchor is represented as a circle, and two anchors are connected by a straight line. That line is the cutting line, so make sure that it is hovering just off the outline of the object, or touching it. Once you've reached the point where you started, move on to the next step.
  4. Connect the first and last anchors by holding down CTRL and clicking the first anchor. This will connect them properly. If you do not hold down CTRL, then it will move the first anchor instead.
  5. Create a selection from the path. All that is needed is to click the button labeled "Create Selection from Path" under the path tool.
  6. Open up your layer dialog and create an alpha channel. To do this, right click the active layer, and near the bottom is a button named "Create Alpha Channel".
  7. Lock the new alpha channel. This can be done by looking under the opacity meter and checking the box next to the checkerboard-like icon.
  8. Invert and cut out your object. It is important to do that in that order. Press CTRL+I to invert and then CTRL+X to cut. Your object should now be on a checkerboard background, indicating that it is transparent.
  9. Erase any remaining pieces of background. Unless the path was 100% perfect, there will be small pieces of background stuck to the outside of the object or small divots where pieces of the object were cut out. While not much can be done to fill in spots that were cut out, the leftover background can be erased. Take a 1 pixel eraser and remove anything leftover.
  10. Save the file.
    • If you have a multi-layer image, regardless of whether you want to keep transparency, it must be saved as an .xcf image.
    • If you want it to stay transparent, you must save as an .xcf, .gif or png file. Other formats can't handle transparency, and will put the image on a white background.
    • If you want to upload it to the Internet, saving 2 copies is recommended. In the file menu, click "Save a Copy...", and save it as a .xcf file. This file you just saved shall stay transparent and allow you to make changes without extracting again, while keeping the current image intact, which you can continue to edit or save as your preferred format.



Tips

  • If it is your intention to remove the object itself from the picture, and not the background, skip the Invert step, and Cut first.
  • The line between two anchors can be curved by clicking and dragging an anchor in Design mode, or dragging the line in Edit mode. Doing this will cause two squares to appear, called handles. Just rotate these to curve the line. Use this to create a smoother cut.
  • If you want, you can feather the edges to create a blur effect.
  • The image you have now extracted can be placed on a new background, be a part of an animation, or just kept the way it is. Be creative!

Warnings

  • Be neat and take your time. If you don't like the job you've done, it will have to be extracted again, which wastes time.

Related Articles