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.
Contents
Steps
- 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.
- Select the path tool from the menu. This is the tool this tutorial will be using.
- 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.
- 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.
- Create a selection from the path. All that is needed is to click the button labeled "Create Selection from Path" under the path tool.
- 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".
- 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.
- 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.
- 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.
- 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
- Install GIMP
- De Haze a Photo with GIMP
- Make an Animation in Gimp
- Select Text With Gimp
- Draw Something in GIMP
- Create Line Art Using Gimp
- Add or Remove Guidelines in GIMP