The common approach to doing many things in GIMP is to first get a good selection. However, when removing an anti-aliased object from its background is not a good idea, as shown above.
You'll note that each of the three zoomed in selections above have varying amounts of the green-blue mix selected. When these are filled, we are left with flat black and slightly blueish- green pixels between them, or no transition to black at all.
Compare each with the target image below. The left one has a blue border around it. This looks somewhat neat, but not what we're going for. The middle one is close, but there are some ugly visble pixels still. You can try getting rid of all the ugly pixels, but then you'll end up with something jagged like on the right.
You can spend hours trying to find something that will work perfectly, but you won't.
Anything short of the rightmost image has some blue in the pixel, which will stick out. You can go too far, and blend it back to something close, but this is time consuming. Instead, may I suggest the rest of the tutorial?
The first step is to activate the color to alpha plug-in. Its menu location is <image> Filters ->
Colors -> Color To Alpha, where <image> means to right click on the image. If its grayed-out, it
means that you have an indexed image. If its not there, upgrade your gimp to 1.2.x.
Step 2
Next use the Color Picker Tool to select the background color.
Step 3
When you used the color picker to select the background, a window with the color popped up. Click, hold, and drag from the color portion of this window to the color portion of the Color To Alpha plug-in. If using Gimp for Windows, you'll have to right-click on the destination button and select the Foreground - drag n' drop doesn't work. Click OK after the color indicator on the Color To Alpha plug-in is changed to blue.
Step 4
Step 5
Now create a New Layer (have Forground set to Red when you do this). Lower the newly created layer.
The image should now be green on red, with no trace of blue!
This may not work as well for you for 2 reasons:
Photo's don't tend to have one color you can choose like that
The foreground may contain portions of that color that are removed by the plug-in The work arounds, respectively, are:
Apply multiple times, or just once and touch-up by hand
Paint underneath the new image with the original color to bring it back to those portions that need it
The original tutorial can be found here.
CHANGING BACKGROUND COLOR 2
Text and images Copyright (C) 2002 Francisco Bustamante Hempe and may not be used without permission of the author.
Many times you have an image with a colored background, like the one above and you want to take out the background to use the image's subject in a composition. With gimp there are many ways to achieve this, one of which is using a plug-in specifically designed for this: Changing Background Color 1.
Step 1
In this tutorial I explore the select by color option to remove a particular color from the image. The first step, after you have loaded the image of course, is to click on the Select By Color tool.
Like other selection tools, this one provides several options that can be modified. The top row of buttons sets the Selection Mode. We will use the add option, which means any color we click on will be added to the selection. You can also use the Shift key to acheive the same result.
The other interesting setting is the Threshold. When you click on a color, the higher this setting is, the more similar colors to the one you clicked on will be selected. You can start by using the default setting and increasing it if you need to add more colors faster, or decrease it if you're selecting more then you want.
Now it's time to start selecting the color you want to remove. Just start clicking on the color you don't want and watch the selection update. If that didn't select all the color you want, continue clicking on the unselected parts until you get the desired result.
Finally, there is one last step before you can remove the background. You have to add an alpha channel (a common term for transparency in images) to your image. To do that you have to use the right button on the mouse to get the image menu and go to layers and add alpha channel.
With the selection complete and with an alpha channel just choose from the image menu
<Image> Edit -> Clear, and the image background will be gone.
After the last step you should get something like this in Gimp.
You can now use this image in a composition or in a web page with a different background like below:
Final
Of course you still have to take care of the details if you want to merge an image perfectly into another.
The original tutorial can be found here.