Jump to the video

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 your 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

Include file ‘youtubePlayer.html id=”ZiySD69xnG8”’ contains invalid characters or sequences




This article was last updated on: 03 Jun 2009