Last Updated: 20/02/2026
Removing the background from a photograph is useful when you want to isolate a person, product or object and place it onto a completely different image.
There are several ways to remove backgrounds in GIMP, and the best method often depends on the photograph you’re working with. In this tutorial, we’ll look at a technique that works particularly well when your subject is photographed against a plain or predominantly white background.
We’ll create a black-and-white version of the image, use it to produce a layer mask and then place the finished subject onto a new background.
Open Your Images in GIMP
Start by opening GIMP and making sure the main panels you’ll need are visible.
You should have access to the:
- Toolbox
- Tool Options
- Layers panel
Next, open your new background image in GIMP.
You can then drag the photograph containing the person or object you want to isolate onto the canvas. This should create another layer above your background.
At this stage, you’ll have your new background on the lower layer and the photograph you want to edit above it.
Add an Alpha Channel
Before removing the white background, make sure the photograph you’re editing supports transparency.
In the Layers panel, right-click the photograph layer and select:
Add Alpha Channel
An alpha channel allows areas of the layer to become transparent. Without it, removing part of an image may simply reveal the layer’s existing background colour rather than creating transparency.
Scale the Photograph
If your photograph is considerably larger than the background image, you may find that parts of it extend beyond the canvas.
Select the Scale Tool, click on the photograph and resize it until the subject is at a more manageable size.
Don’t worry about getting the final position perfect yet. We’ll resize and reposition the subject again after removing the background.
Duplicate the Image Layer
Before creating the mask, duplicate the photograph layer.
Right-click the layer and select Duplicate Layer.
You should now have two copies of the same photograph.
We’ll use the upper copy to create the black-and-white mask while preserving the original colour photograph underneath.
This is useful because the mask we’re creating isn’t intended to become part of the finished image. It’s being used to determine which parts of the original photograph remain visible.
Desaturate the Duplicate Layer
Select the duplicated layer and convert it to greyscale.
Open the Colours menu and choose the appropriate desaturation option. In the tutorial, the Luminosity setting is used.
The photograph should now appear in shades of grey.
The next objective is to create as much contrast as possible between the subject and the white background.
Increase the Contrast Using Curves
With the greyscale layer still selected, go to:
Colours > Curves
Adjust the curve so the subject becomes considerably darker while retaining important details around difficult edges, particularly areas such as hair.
The background should remain light while the subject becomes darker.
Don’t worry if the image looks unnatural at this stage. You’re not creating the final photograph – you’re creating the basis of a mask.
The important thing is to maintain a reasonably clear distinction between the subject and the background.
Invert the Image
Once you’ve created enough contrast, go back to the Colours menu and select Invert.
The image should now be reversed so the subject is predominantly white and the background is predominantly black.
This is important because of how the layer mask will work:
White areas remain visible, while black areas become transparent.
Think of the white portion as the part of the photograph you want to keep.
Paint the Subject White
The automatic contrast adjustment probably won’t produce a perfect mask.
Some parts of the subject may still contain dark or grey patches. These need to be cleaned up before creating the final mask.
Select the Paintbrush Tool, choose white as your foreground colour and use a relatively large solid brush to paint over the main areas of the subject.
Everything you want to keep should ultimately be white.
Be careful as you approach the edges of the subject. You don’t want to paint white over areas that should eventually become transparent.
Clean Up Difficult Edges
Detailed areas such as hair usually require more attention.
Zoom into the photograph and reduce the size of your brush. Carefully work around the edges, filling in areas that belong to the subject without destroying the finer details you’ve retained from the original photograph.
You don’t need every edge to be absolutely perfect at normal editing magnification. What matters is how convincing the finished image looks when viewed at its intended size.
Take your time around hair, clothing and other detailed areas because these are usually where background removal becomes most noticeable.
Create the Layer Mask
Once you’re happy with the black-and-white version, you’re ready to turn it into a mask.
At this stage, the principle is simple:
- White = visible
- Black = transparent
- Grey = partially transparent
Copy the black-and-white mask you’ve created.
Return to the original colour photograph layer, right-click it and select Add Layer Mask.
Choose a white mask with full opacity and add it to the layer.
Paste your black-and-white mask into the new layer mask and anchor the pasted selection.
You should now see the white background disappear, revealing the replacement background underneath while keeping the subject visible.
Check the Background Removal
Turn your replacement background layer back on if you previously hid it.
You should now see your subject positioned against the new background.
This is the point where any problems with the mask become much easier to spot.
Look carefully around:
- hair;
- shoulders;
- clothing;
- hands;
- curved edges; and
- other detailed parts of the subject.
If you notice unwanted areas from the original background, you can continue editing the layer mask.
Painting black onto the mask hides parts of the image, while painting white brings them back. This makes layer masks particularly useful because you can continue refining the result without permanently deleting the original photograph.
Resize the Subject and Layer Mask Together
Once the background has been removed, you may need to resize the subject to fit naturally within the new scene.
Make sure you’re working with both the image and its associated layer mask so they remain aligned.
Use the Scale Tool to reduce or enlarge the subject as required.
Think about the overall composition rather than simply making the person or object fit. The subject should look as though it belongs within the replacement image.
Move the Subject Into Position
Select the Move Tool and position the subject where you want it to appear.
For example, you might place a person towards one side of the photograph if you want to leave space for text, a logo or another design element.
Check the scale as well as the position. A technically correct background removal can still look unnatural if the subject is too large or too small compared with the surrounding scene.
Save Your Editable GIMP File
It’s a good idea to save your project before you get too far into the editing process – and continue saving regularly while you work.
Save the project in GIMP’s editable format so you retain the individual layers and layer mask.
This means you can return later and:
- refine the mask;
- reposition the subject;
- resize the subject;
- replace the background; or
- make further colour adjustments.
If you only save the finished image as a JPEG, you’ll lose much of that editing flexibility.
Export the Finished Image
Once you’re happy with the composition, you can export a finished version.
Go to:
File > Export As
Choose your preferred image format and filename.
JPEG is suitable when the final image has a solid photographic background and you don’t need transparency.
If you want to export the isolated subject while retaining a transparent background, use a format that supports transparency, such as PNG.
When Does This Background Removal Technique Work Best?
This technique works particularly well when there is a strong contrast between the subject and the original background.
A person photographed against a clean white background is a good example because it’s relatively easy to separate the light background from the darker details within the subject.
More complicated photographs may require a different approach.
If the background contains lots of colours, objects, shadows or textures – or if parts of the subject are very similar in colour to the background – creating a clean mask can become considerably more difficult.
In those situations, you may need to use GIMP’s selection tools or a more detailed masking technique.
Take Your Time With the Layer Mask
Removing a white background in GIMP doesn’t have to mean painstakingly tracing around every part of a photograph by hand.
By creating a high-contrast black-and-white version of the image and turning it into a layer mask, you can isolate a subject while retaining finer details around areas such as hair.
The basic process is:
- Open the photograph and replacement background.
- Add an alpha channel.
- Duplicate the photograph layer.
- Desaturate the duplicate.
- Increase the contrast using Curves.
- Invert the image.
- Paint the subject white and clean up the mask.
- Apply the result as a layer mask.
- Resize and reposition the subject.
- Save the editable project and export the finished image.
Once you understand how black, white and grey affect a layer mask, the same technique can be adapted for many other image-editing projects.
The key is to spend a little extra time refining the mask. A clean edge around the subject will make the final composition look far more convincing when it’s placed onto a completely different background.
