Advertisement


Gimp : How to make a selection with the current background color considered transparent?


Question

Just like in Paint, how can I do a "transparent selection"? For example, if red is the background color and I select a part of an image with red in it, I want my selection to consider the the red to be transparent.

Or equivalently : How can I change a specific color inside a selection to transparent?

2013/06/10
1
2
6/10/2013 3:24:00 AM

Accepted Answer

Transparent selection with GIMP

Below are some possible approaches using default GIMP 2.8. without additional plugins.

Color to Alpha:

To make the background color in a selection transparent we may take the following steps:

  1. enter image description here Edit - Copy the selection
  2. enter image description here Edit - Paste the selection
  3. enter image description here Colors - Color to Alpha... choose background color

Note that in the example above the color channel for red is completely made transparent leading to a "transparency" with color shift in the grey area too. Depending on our source this may not be what we wanted.

Select By Color

  1. Edit - Copy the selection
  2. Edit - Paste as - New Image to work on a new image
  3. enter image description here Tools - Selection Tools - By Color Select selects all the background
  4. enter image description here Delete the selection
  5. Select - Invert
  6. Edit - Copy the selection
  7. enter image description here Edit - Paste the selection to our source.

Again, depending on the source image we may find it faster to apply the By Color Select tool directly on the image background, invert this selection, then copy & paste it to the destiny (or as a new image for further processing).

2013/06/10
3
6/10/2013 8:50:00 AM