How to make a transparent background/selection on an image using GIMP

  1. Open your image.
  2. Select the area you want to make transparent.
    1. Select the appropriate selection tool from the Tool window or the Tools - Selection Tools menu on the Layer window.  I usually use the magic wand/fuzzy select (Select contiguous region) tool or the Select regions by color tool.
    2. Click in the region you want selected.  Use shift-click to add more regions/colors.
      Tip: It's easier if you zoom in (View - Zoom menu) to see finer details of exactly what you're selecting.
  3. In the Layer window (the one showing your image), select Layer - Transparency - Add Alpha Channel.  If this is blanked out then it's already done.  This makes sure your image can store transparency data.
  4. Select Edit - Clear.  This makes the selection transparent.
  5. Save the file. 
    Note: If you save it as a PNG file, be sure to select the 'Save colour values from transparent pixels' option in the Save as PNG dialog box.

And that's it.

NOTE: IE does not support showing PNG transparencies (alpha channels) natively.  There are a few work arounds for this (theres loads to be found on google) - here's MS's solution.  However, personally, I find the simplest approach is to save the image as a GIF (which all major browers support transparencies for).

When saving your image as a GIF from within Gimp, it will prompt you to export it - you can select either Indexed or Greyscale - however, on the next screen (Save as GIF) be sure to check the 'Interlace' option.

HTH

Tim

This article is part of the GWB Archives. Original Author: Tim Huffam

New on Geeks with Blogs

  • We Won The One Award I Actually Care About

    Full Scale made the Inc. 5000 for the fifth year straight, the 12th listing across my three companies. Here is why the one award you cannot buy is worth stopping for.

  • Your Customers Build the Features Now

    I let a tool I liked sit dead for a year rather than build the features I wanted. An MCP server meant I never had to, and your customers can do the same to your product.

  • Get the Size of a Directory in Linux the Easy Way

    du -sh for the quick answer, ncdu for the cleanup, df for the disk itself: every command for checking directory size in Linux, plus why du and df never agree.

  • Vim Search and Replace: The Ultimate Guide

    One :%s command replaces every match in a file before a find dialog would even open. The Vim substitute patterns worth the muscle memory: flags, ranges, capture groups, and multi-file edits.