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.

The Computer Deconfuser

  1. Download it to your hard drive and open it in the Gimp.Open image with solid color background in the Gimp
  2. Right click the only layer and add an alpha channel.Add an alpha channel
  3. Select all of the image.Select all of the image
  4. Select the bucket fill and change the mode to “color erase”.Select the bucket fill and change the mode to color erase
  5. 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.Gimp setting to remove a solid color background and add transparency
  6. 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. Open image with solid color background in the Gimp

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

The Computer Deconfuser

8 Responses to “How-to remove a solid color background from images using the Gimp”

  1.  Sara Says:

    Thank you! I knew there had to be an easy way to do this.

  2.  Gimp Tutorials Says:

    Thanks for this valuable post. I love gimp.

  3.  John Says:

    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!

  4.  rjmolesa Says:

    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.

  5.  Jose Says:

    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….

  6.  Allan Says:

    Thanks!!!

    I tried several “guides” to solve this problem. Yours is the first one I actually got to work :-)

  7.  Joe Says:

    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!

  8.  Mike Says:

    Thanks, I’ve been trying to do this for 2 days.

Trackbacks

Leave a Reply


Creative Commons License
This work is licensed under a Creative Commons Attribution-NoDerivs 2.5 License.