I have this image:

enter image description here

Downloadable here.

I need to isolate the libellula and "restore" the transparency of its wings, the areas highlighted here:

enter image description here

I haven't problems to isolate it but how can I restore the transparency?

The image must be saved as PNG with alpha channel, without the background.

I haven't enough knowledge about GIMP and image manipulation, I already tried with the rubber tool adjusting the opacity but the result is very bad.

Thanks a lot!

  • This takes careful color selection and brushwork on a mask. There's no easy solution in any application which I'm aware of.
    – Scott
    Nov 12, 2019 at 19:29
  • 2
    Hi. Welcome to GDSE. The image you linked to contains no transparency, so there is nothing to "restore". You'd need to do this yourself using masking or GIMP's colour to alpha functionality - but it'll probably never look perfect.
    – Billy Kerr
    Nov 12, 2019 at 21:12
  • Calopteryx splendens?
    – xenoid
    Nov 12, 2019 at 21:32
  • @BillyKerr thanks, for "restore" I mean "make them transparent back". I agree with you that it'll never look perfect but at least acceptable if seen without zooming it. Nov 13, 2019 at 8:24

2 Answers 2


You can try GIMP's Color > Color to alpha. You must combine with layer masks

  • one version which is otherwise well separated from the background but the wings are still green

  • another version where the wings are transparent as wanted but something else green has also vanished

Hopefully you have a high resolution photo. The shown version in the question is inferior, the fine structures need much more. I didn't try the link.

This is one click version. Color to alpha is applied once by clicking green and trimming the treshold sliders in color to alpha dialog.

enter image description here

NOTE after you have combined two versions to one, it probably has green reflections. When the green background is removed, all its reflections are irrational. You must apply selective hue & saturation adjustment to convert the green to insects own color or at least to less offensive. This is normal when backgrounds are removed from photos. Strong color from the nonexistent environment looks wrong.

  • Thanks for your answer, the Color to Alpha tool is simple and immediate. But, it seems not always working on GIMP 2.8: when I apply it from the second time to the same selected area, often it does nothing... there is something I don't know or I'm wrong? Nov 13, 2019 at 8:27
  • Do not expect Color to Alpha is your universal background removal tool except in cases where the photo is shooted with proper studio lights which are specially designed for color keying. The target must also be prepared for color keying, it must have no key color. As I said, you can get back the transparency to the wings but you must fix everything else otherwise. Removing the green plausibly without causing transparency to elsewhere and the remaining parts of the wings is a hefty job. BTW hopefully you accepted the picked color and selected the new one after pressing OK
    – user82991
    Nov 13, 2019 at 9:45

Possible solution for Gimp 2.10:

  • Put your image in a group
  • Add a layer above it, set layer mode to Color erase (this mode is new in 2.10)
  • Paint the layer with the color you want to make transparent
  • Use additional layers for additional colors (you could use several shades of green...)
  • You can put a layer outside and below the group to check transparency over a specific background (you don't need a group if you don't need this layer).

enter image description here

As you can see this technique can also be used to extract the rest of the subject.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.