Notes on The GIMP (image editor)

"GNU Image Manipulation Program"


Making a transparent image

First, note that the image has to be either GIF or PNG. If your image is JPeG or something else, convert it using The GIMP by opening it, then doing Save As....

Next, perform these steps with the image loaded into The GIMP. When you perform these steps, don't fret that you fail to see the application do anything obvious.

  1. Right-click anywhere on the image and choose Layer → Transparency → Add Alpha Channel.
  2. Right-click and choose Select → By Color.
  3. Click on the part of the image where what you want to become transparent is (background, etc.). You may (should) see areas become outlined.
  4. Right-click on the image and choose Edit → Clear. At this point, you should see your background or whatever you clicked on replaced by a sort of checkerboard pattern indicating what The GIMP's "erased".
  5. Save your changes. If what you're saving isn't .png, do Save As...:
    1. Shift-Ctrl E.
    2. Give the file a name (with the correct extension, .png).
    3. Choose the correct type ( .png).
    4. Click the Export button.
    5. Confirm Replace, if necessary.
    6. Click Export again.
    7. Choose File → Quit.
    8. Click Discard Changes.

Note that if you've got something pretty white on a white background (could be another color you're selecting, so this doesn't apply only to white), the transparency may obliterate it in an undesired way. To fix this, use the paint can tool to change the color of the background before selecting By Color. If you have trouble with this working, please see the solution below.


Using the paint can

The paint can might not be too discriminating. It dumps paint to re-color places in the image and it will often leak out over similar colors. This is especially frustrating when you're trying to do some transparency work.

To fix this, leave selected Fill similar colors, but select Sample merged and play with the Threshold setting: the lower the number, the more discriminating the effect.


Using the gradient editor

Read about this here. Or follow these brief steps.

  1. Open the Gradient Editor.
  2. Windows → Dockable Dialogs → Gradients (or something like that).
  3. To make your own gradient, right-click anywhere in the list and select New Gradient.
  4. The Gradient Editor will display a simple gradient blending from black to white. Below the preview, you see a black triangle at each edge and, in between, a white one at the midpoint. You can grab and move the white triangle toward one end or the other to favor the change in color.
  5. Name your gradient to make it easier to find later.
  6. Add the first two colors by right-clicking anywhere in the preview window and selecting Left Endpoint's Color, then Right Endpoint's Color.
  7. Add more colors if you need to by splitting the initial two-color gradient into two or more segments, then, treating each as a separate gradient, choose more colors as in the previous step. To get this started, right-click and choose Split Segment at Midpoint.
  8. To use the gradient, apply it to a document using the Blend Tool. For example, open a a blank document, select the Blend Tool from the Tools dialog, select your gradient in the Gradients dialog, then click on the left of the document and drag the mouse to the right before releasing the button. The document should be filled with your gradient.