Removing background of an image is super easy if you know how to do it. Here in this tutorial we will explain 5 different ways which you can use to remove background in Image Using GIMP.
There are many ways you can delete any part of an image. That can be the background of the main subject of your image or some sections of it. That includes making the image background transparent and associated steps.
GIMP is the free and open-source closest Photoshop Alternative application which is used by millions every day. And if you are a beginner in GIMP or learning image processing, then there is no harm learning these steps to make any sections of a complex image transparent, including background.
The steps outlined here, uses basic tools which is similar to other photo editing software. Hence, you’re learning in this tutorial can easily be applied to alternative software.
5 Ways to Remove Background in Image Using GIMP
Method 1 – Fuzzy Select
The Fuzzy Select tool allows you to select all pixels that are similar to a set of sample pixels within a local area of an image. This works for the images where there is a color distinction between foreground and background image foreground.
So, if your image background and main subject/foreground are of identical color (like this image below), then this method may not help. Try other methods explained below. But still, you can go ahead and try-out all methods, if you have spare time.
- Open your image in GIMP.
- Right-click on the layer and add Alpha channel. This ensures that you can easily delete your layer with transparency. You can verify whether the Alpha channel is already added to your image or not by right-clicking the layer and see if the add Alpha channel is greyed out.
- From the toolbox select the Fuzzy Select tool and make sure Anti Aliasing, Feather Edges and Draw Mask is checked. The Draw Mask option will help to visualize the background which you want to delete.
- Now click on the section of the image of the background which you want to delete and hold down your click, then drag the mouse to your image to see a mask drawn on your image.
- The color selection shows the selection that you are choosing. Dragging the mouse below will increase the threshold of your selection, and towards up it will reduce the threshold of your selection.
- Once you are satisfied with your selection, release the mouse and press delete from your keyboard to delete the selection.
You can repeat you can repeat this process as much as you want to entirely get rid of the background of your image.
Method 2 – Select by color
In the next method, we will use the select by color tool which select the entire background having the same color pixels. This method works better for the vector images, which typically have uniform color distribution. This method might not work well for real-world images where there are too many color gradients or sharp edges.
- Select the “select by color” tool from the toolbox. Make sure Anti Aliasing and Draw Mask is enabled from the option.
- Make sure to enable the Feather Edges option if you are working with a complex vector image.
- Now, click on the background section of your image having the same color and drag the mouse down or up to increase or decrease the threshold.
- Once you are happy with the selection, let go of the mouse hold. Press delete from your keyboard.
Likewise, you can repeat the steps multiple times to get rid of the background entirely.
Method 3 – Paths
Another way of removing the background of an image is using the Paths tool. This is more of a manual way of deleting the background of an image.
This method gives you the most accurate results among all the methods described here. But it takes a bit of time and patience to do it.
- Select the Path tool from the tool box.
- Begin clicking around of your main subject of the image to place individual points outlining the subject.
- You can curve the line by drag down the middle of the line and moving the left and right handle towards the center of the line.
- To continue drawing, make sure you click on the most recent point and continue.
- Once done, you can close the outline by holding CTRL and clicking on the first point placed.
- Press Enter to create a selection using the outline.
- From the menu, Select Invert. This will select the background of the image.
- And press delete to delete the background.
Method 4 – Layer Mask
A more advanced way to delete background is to use a layer mask. This is useful for those photograph where you have fine details such as hairs, furs, grass etc. Those fine details are difficult to aele6 manually using the above methods.
But there is a catch. This method only work best where there is high level of contrast of color present between the main subject of the image and its background.
- Right-click on the layer and create a duplicate layer.
- While the duplicate Layer is selected, Go to Color > Saturation. Change the scale to all the way to zero. Click ok.
- Go to Color > Curves and manually adjust the top and bottom nodes so that your main subject of the image fills with more black and background is white.
- From the menu, select Colors > invert. Then select Edit > Copy Visible.
- Hide the duplicate layer by clicking on the little eye icon on the right toolbox.
- Right-click on the original layer and click Add Layer Mask. Click Add.
- Paste the copied visible image using Edit > Paste.
- Click on green icon at the bottom of the layers window to merge the pasted layer to the layer mask.
- At this stage, you should notice that the black area remained visible, and the white area is transparent.
To fine tune the sections, you can use a white color brush tool and fill those sections which are part of your main subject but became transparent in the process.
And there you have it.
Method 5 – Foreground Select
The final method we are going to explain is the foreground select method. This method is also good choice as well for complex images having hairs, grass etc.
- To get started, select the Foreground Select tool from the toolbox and do a simple outline of the subject. It need not be a perfect, like below. It’s more like an outline covering the entire subject.
- Once you are done, join the select point to the first point and press enter to select the subject.
- This will create a dark blue area over the background and a light blue area to the foreground.
- Now select white foreground color and manually brush the subject without going too much towards the edges.
- Once you are done, select the preview to see how it looks. Based on the color profile of your image, this preview step might take the couple of seconds to process.
- If you are happy with the preview, click select. And then press enter to make this as a selection.
- Invert the selection using Select > Invert.
- Press delete from the keyboard.
- And you have your image ready without the background portion.
So, that’s about it with the five methods which we just explained to remove background from image, photographs using the free and open-source tool GIMP. Let me know if this tutorial helped to you understand the steps and get the desired result.