It’s easy to change the background of a photo in Photoshop , but you don’t have to pay for expensive software if you don’t want to. GIMP is the best free image editing software around, and it’s almost as powerful as its commercial counterpart.
Changing the background in GIMP is simple, and there are several different ways to do it . In this guide we’ll take a look at two of the best solutions — one very quick the other more precise (and powerful).
Before You Begin
If you’re new to GIMP you might be confused by its unusual user interface. By default, GIMP is set up with each interface element — windows, toolbars, palettes, and so on — existing as their own self-contained, floating unit.
To get a more traditional view go to Windows > Single-Window Mode. This locks all those elements together in the style of pretty much every other app you’ve ever used.
The Quick Method: Foreground Select Tool
One of the quickest ways to change the background in an photo is to use the Foreground Select Tool. This is a semi-automated tool that does most of the work for you, but it only works well on some images.
The foreground part of the image must have well defined edges and clear separation from the background. Strong contrast around the entire foreground element, either of tone or color, is what you’re looking for.
Open the image and select the Foreground Select Tool from the panel on the left of the screen (it looks like a picture of a person being removed from a background).
1. Draw an Outline
First, draw a very rough outline around the foreground object by clicking, dragging, or a combination of both. It doesn’t need to be precise. All we’re doing at this stage is telling GIMP which areas of the image contain foreground elements, and which contain background.
Once your selection is complete, you’ll see a dark blue overlay on the background, and a lighter blue overlay on the rest of the image. If you’re working with a predominantly blue image you can change these overlays to either green or red in Tool Options.
2. Paint Over the Foreground
Now, paint a single line across all the parts of the foreground object, taking in all of its different tones and colors. Make sure you don’t overlap into the background — you cannot undo this step, so you’ll have to start again if you go wrong.
When you release the mouse button GIMP will begin analyzing the image. It takes a few seconds. When it’s finished the dark blue overlay covers the background, and there’s no overlay on the foreground. If there are any parts of the foreground that haven’t been included just paint on them again to add them.
3. Create and Copy the Selection
When you’re happy hit Enter to turn the foreground into a selection.
Copy the selection by pressing Ctrl + C on Windows or Cmd + C on Mac. The go to Edit > Paste As > New Layer.
The foreground is now pasted as a new layer, with a transparent background. Go to Select > None to remove any leftover selections, and hide the original image by clicking the eye icon in the Layers palette on the right.
4. Add the New Background
You can now add your new background. Create a new layer and move it just below the foreground layer. You can either paste an image into this layer, or fill it with color using the Bucket Fill Tool (Shift + B).
Drag the foreground object into position with the Move Tool (use the keyboard shortcut M) and you’re done.
The Advanced Method: Paths Tool
For any images where the object you want to select has fuzzy edges or is on a detailed background, the automated tools won’t work. You need to use the Paths Tool instead.
The Paths Tool is GIMP’s equivalent to the Pen Tool in Photoshop . It’s a little more difficult to use, but is incredibly powerful.
How to Use the Paths Tool in GIMP
The Paths Tool enables you to create complex selections by placing a series of dots, called nodes, onto an image. These are joined together by a line which can be straight, curved, or angled. By placing the nodes around the edge of an object you can select it very precisely.
Here are the Paths Tool basics to help you get up to speed:
Each click on an image file creates a node — click multiple times to create a path.
Click and drag when placing a node to add handles to the node. These enable you to create curves. The rear handle adjusts the angle that the line enters the node; the front handle sets angle the line leaves the node. Move the handles up and down, or in and out to modify the curve as needed.
When placing a new node, click and drag in the direction you want the line to continue and you can create a curve much more quickly. This way you only need to use the handles to fine-tune your path.
Nodes can be edited at any time by clicking on one to select it. You can move it into a new position or adjust the handles. To delete a node, click on it and hit Backspace. Make sure you select the last node in the path before you start adding more nodes.
The idea behind the Paths Tool is very straightforward but it can take some time before you become comfortable with it. It’s worth taking a few minutes to practice on a blank image file, to familiarize yourself with how it works.
Change the Background With the Paths Tool
When you want to cut out an object with the Paths Tool the idea is to position the nodes so that the path traces a line around the edge of the object.
1. Zoom In
Zoom into the image quite closely. You want place the nodes marginally inside the edge of the object rather than on or outside it. This will avoid any fringes around your selection.
2. Start Adding Nodes
Pick a starting point for your first node. Choose somewhere with no detail, preferably a corner or straight edge.
Now start dropping additional nodes around the edge of the object. The gap between the nodes can be greater in smoother, less detailed areas. Where there’s more detail, zoom in and use more nodes.
3. Complete the Selection
To finish, place your final node right next to the first one then hit Enter to turn the path into a selection. Go to Select > Feather and keep the default setting of 5px to slightly soften the edges of your selection.
Now copy-and-paste the selection as a new layer and hide the original layer.
4. Add the Background
Finally, add your new background. Drag the image containing the replacement background into the GIMP window. This will add it as a new layer, but make sure you place it below the layer containing your cut-out object. Use the Scale Tool (Shift + T) to resize it.
Select the layer containing the foreground object and hit the M key to open the Move Tool. Now drag it into place and save your newly edited image.
GIMP has many different ways to produce the same result. The key is to pick right one for the image you’re working with.
The Foreground Select Tool is perfect for selections on simple images, while learning the Paths Tool will give you much more control. With the right image, either method can produce outstanding results.
How did you get on with this tutorial? Hit up the comments below to share your thoughts, questions, and any other tips you might have.