Remove background of an image without annoying pixels around the edges

Sometimes I want to modify images for a website and make them transparent. When I remove the background, background pixels are still visible and I always wondered what the best solution would be to resolve this.

I found this post of blogger Haishi that resolved it for me.

The method is done with GIMP, a free image editing tool. Just follow the next few steps:

  1. Open the picture in GIMP.
  2. In Layers window, right-click the layer and select Add Alpha Channel.
  3. Duplicate the layer.
  4. Hide the lower layer, then select the top layer.
  5. Use color selection tool to select background.
  6. Use Select->Grow menu to grow the selection by 1-2 pixels.
  7. Press Delete key to delete the background.
  8. Hide the top layer, show and select the bottom layer.
  9. Press Ctrl+Shift+A to unselect everything.
  10. With bottom layer selected, select Colors –> Color to Alpha… menu.
  11. Select the color you want to change to alpha and click OK to apply the filter.
  12. Turn on the top layer again.
  13. Optional, use Image –> Autocrop image to crop the image.
  14. Export to a png file.

You now have a perfect transparent picture, with thanks to Haishi.

Leave a Reply

  

  

  

*