61

How can I make part of the image transparent? I tried the "Color to alpha" option in GIMP, but it's not working.

I know in Photoshop you can erase the part you don't like, and make it transparent. Does GIMP support that?

daisy
  • 6,732

4 Answers4

80

In GIMP layers can either have an alpha channel or have no alpha channel. When you try erasing parts of an image when there's no alpha channel you get backround color.

To add an alpha channel you can bring up the Layers dialog by pressing Ctrl+L, right-click on the layer you want to edit and select Add Alpha Channel there.

enter image description here

From there everything is very much like in Photoshop - i.e. Eraser tool erases to transparency, you can make a selection (using, for example, Magic Wand tool) and erase everything in it by pressing Del, etc.

Black
  • 834
Sergey
  • 44,443
  • doesn't work for me. I select the area I want to be transparent and hit Del and it still is white. – chovy May 28 '20 at 18:09
  • This did not work when working on an opened PNG file. Maybe it only works on a "new" file that has "transparency" chosen. I submitted an answer below that works for this type of case. – Demis Jul 25 '25 at 05:33
  • @Demis: This answer most definitely works for PNG and JPEG images, not only for "new" files you created in Gimp – Sergey Aug 19 '25 at 23:32
  • Maybe more recent version? I tried a few times with JPG/PNG files and erasing was always just like drawing with the background color. I looked it up more and "alpha" channel technically doesn't mean transparency, it's just "another" channel that the rendered must choose what to do with (or the file format defines it). So I assume that could be why "Layer Mask" worked better for me - just a guess tho. – Demis Aug 31 '25 at 00:14
  • @Demis: In the context of "normal" RGBA images, "alpha" most definitely means transparency, just like R, G and B channels are for red, green and blue.

    There are exotic formats, such as GeoTIFF etc. where the meaning of channels may be completely different, such as "average windspeed" and "annual precipitation" etc., but for any normal image made for viewing alpha is a synonym for transparency.

    – Sergey Sep 01 '25 at 02:03
9

If you use an eraser, that will erase to transparence. You also can select an area and press the delete key (not backspace)

pbfy0
  • 305
0

I find the simplest way to do this in GIMP is to use a Layer Mask.

Many other answers don't work if you opened an image file (eg. JPG, PNG etc.), because using the eraser doesn't reveal transparency, instead appears to erase to the background color.

The below does work for JPG/PNG.

  1. Right click the Layer you want to add transparency to.
  2. Choose Add Layer Mask.
  3. Choose the first option in the popup for "full opacity" (meaning the transparency won't change, everything will be opaque still).
  4. Now you'll see two images in the Layer panel for this Layer. If the left one is selected, you're drawing on the Image. If the right one is selected, you're drawing the Layer's transparency, where Black=Transparent and White=Opaque. By default, you'll now be drawing on the Layer Mask now.
  5. Select any drawing tool - eg. paintbrush, or Fill/Paint Bucket tool if you're using a selection.
  6. Change the foreground color to black (transparent), or click the teeny button that sets the paint colors to Black foreground / white background.
  7. Draw/fill black wherever you want the image to be transparent.

If you want to permanently apply this transparency to the layer, right-click the layer and choose Apply Layer Mask.

Demis
  • 111
-1

I think what you want to so is as follow: You blur a layer (eg image of a face) and want to remove the blur from detail areas (eg eyes, lips, eyebrows). Add alpha channel to the blur layer as suggested above, then hold down Alt as you use the eraser tool, and it will remove the effect only from the erased area. Then turn down the layer opacity until you get a just perceptible softening of the features with sharp details (eyes, lips, etc).