Hans Fangohr, Computational Science
  • home rnd notes
  • Pages
  • Books
  • Linux
  • Alpine
  • Email
  • Mac OS X
  • SVN
  • Brother MFC
  • Windows
  • imap Soton
  • On programming
  • IoP CPG Newsletter
  • Ubuntu
  • Eclipse
  • LaTeX
  • Emacs
  • Image processing
  • Home HF
  • |
  • Random notes
  • |
  • Image processing

How to make background in image transparent?¶

Here is a solution using Gimp (2.0):

  1. convert image to gif (assuming you want to use this for a webpage)

  2. open image in gimp

  3. right click on image and choose Layer -> Transparency -> Add Alpha Channel

  4. right click on image and choose Select -> By Color, then left click somewhere on the background in the image that you want to make transparent

  5. right click on image and choose Edit -> Clear

  6. save image.

Online editor¶

Update: March 2015

Can do this online at http://www.online-image-editor.com (thanks to Marijan Beg for pointing this out):

It works both for images and animations. For transparent background: Upload image -> Wizards -> Transparency (diamond icon) -> click the colour background.

How to get rid of the (white) border around an image?¶

A very elegant solution is provided by the -trim option of ImageMagick’s convert command:

convert input.png -trim output.png

Return to Top

Created with reStructuredText and Sphinx.