How-to remove a solid color background from images using the Gimp
Every so often I need to remove a solid color from the background of an image in order to use the image with what ever background I apply. Since I don’t do this everyday I end up fiddling around with the GNU Image Manipulation Program for some time before I remember the easy way to remove the background color. I could always ask my wonderful Graphic Designer wife to do it for me, but sometimes I just like to do it myself. So this is as much of a reminder post for me as it is intended to help others who may be looking for an easy way to remove a solid color background from an image. A quick search only turned up many how-tos to remove an actual background from an image which involve masking and painstaking use of the pencil. I just don’t have the patience for this. So this is how I remove the solid colored background from an image, and replace it with a transparent alpha channel.
Let’s use The Computer Deconfuser logo as our example as it has a nice solid white background.

- Download it to your hard drive and open it in the Gimp.

- Right click the only layer and add an alpha channel.

- Select all of the image.

- Select the bucket fill and change the mode to “color erase”.

- Change the foreground color to the one you want to remove, in our case it’s white. Make you settings look like those in the screenshot.

- Click on the color you want to remove. The entire solid color background should have been removed and replaced with a transparent background. If not, make sure you set the threshold to the 255 max value. If your background color appears elsewhere in the image it’s likely to get removed as well. In that case just tweak the threshold until you get what you want. Now just save the new image and you it on any color background.

And here is the finished product. Notice that it’s using the background color of the page.


June 16th, 2009 at 10:59:00
Thank you! I knew there had to be an easy way to do this.
September 19th, 2009 at 15:08:29
Thanks for this valuable post. I love gimp.
October 4th, 2009 at 19:12:50
Thanks, this helped me out a lot! I never realized that this was such a simple thing to do!
I took a picture of the moon at night and using the method outlined in your document I have a beautiful pic with no black background anymore!
October 4th, 2009 at 21:02:11
John,
I’m glad you found the article useful in applying a transparent background to your image. Thanks for taking the time to leave a comment.
January 31st, 2010 at 23:47:48
Dude, this tutorial was outstanding. You made my day. Keep it up. This is one of those pages I’ve placed at the top of my Bookmark list….
February 24th, 2010 at 08:06:32
Thanks!!!
I tried several “guides” to solve this problem. Yours is the first one I actually got to work :-)
April 21st, 2010 at 00:53:55
Thanks for this tutorial. I needed to remove a black background from a white cloudy texture so it could have a transparent background and it worked perfectly!
June 8th, 2010 at 13:01:22
Thanks, I’ve been trying to do this for 2 days.