Archive of articles classified as' "Image editing"

Back home

Making White Background Transparent


Overlapping images with and without white backgroundsI often need to remove white background from images in order to place images close to each other or make them partially overlap. Most of my use cases (slides, paper documents) have white as the background colour for the final document.

Many image editors have sophisticated tools (magic wands, Color to Alpha etc.) to create masks from similar colours bordering an area, which then allow you to turn the masked area transparent. Such tools need good care, because using them with wrong sensitivity settings can result in turning too much of the image transparent. They also demand a lot of patience to master, so they are occasionally cursed as “tragic wands.” For removing white background from images to be used on a white background, such sophistication is often not necessary – it is enough to just make one colour – white – transparent in the images. While it is a trivial change in the file, unfortunately many image editors offer no such functionality.

In Windows, I used IrfanView: in Save options for PNG there is a checkbox “Save Transparent Colour” and you can select the colour to become transparent by a single mouse click on your image. I haven’t found a similarly elegant solution on Mac, but GIMP can do it relatively easily (I learned this solution from that post).

Transparent background in GIMP

  1. Enable transparency: Layer -> Transparency -> Add Alpha to Channel
  2. Activate the “Select by Color” tool
  3. In “Tool Options,” set Threshold = 0 and press Tab key to make sure the new value is set
  4. On the image, click on an area that has the colour you want to make transparent
  5. Clear the selected area by Delete or Cut
  6. Export the image to PNG using File -> Export As

This method often leaves the edges of the image rough, which is fine if you only want to overlap the empty areas of the images, but not suitable for clean full overlaps. In these cases you can try higher threshold values (e.g. 50 or 100) or use intelligent tools such as magic wands.

No Comments