So I had an image with a white background, but essentially no white in the image itself. And, I needed to make the background transparent.
Without anti aliasing, this is quite easy. You can just go into gimp, do a ‘Select By Color’, choose the background color, delete the selection, and it’s gone. (make sure you’ve added an alpha channel into the layer if it didn’t have one)
But, with antialiasing you have problems. The antialiasing blends the color pixels of the image with the background color, leading to partially colored fringes around the edges after you’ve done the above step.
So, I did the following:
I did the above, where I did a Select By Color and clicked on the background.
Select | Grow, to grow the selection by 1 pixel.
Then do Filter | Colors | Color To Alpha, and choose the background color. Boom. Gone. Problem solved.
(This isn’t completely perfect. You might get a small amount of fringing of a different color on a small bit of the image. You’ll have to look at it.