Mobile app version of vmapp.org
Login or Join
Ann6370331

: GIMP: Setting entire foreground to a particular colour In GIMP version 2.8, I have an image with a black foreground, and a transparent background. I want to set the entire foreground to red,

@Ann6370331

Posted in: #Gimp

In GIMP version 2.8, I have an image with a black foreground, and a transparent background. I want to set the entire foreground to red, instead of black. What's the simplest way of doing this?

I have tried using the fuzzy select tool and doing a bucket fill on the selection, but this doesn't seem to select the entire foreground. After the bucket fill, there is still a black line around the edge of the foreground image. So it seems that the fuzzy selector didn't select the entire foreground. On closer inspection, the edges of the foreground are not perfectly black, but have some grey pixels. But when using the fuzzy selection, I set a very high threshold (250), so I would have thought this this would select the entire foreground, including the grey pixels.

Any help? Thanks!

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Ann6370331

2 Comments

Sorted by latest first Latest Oldest Best

 

@Shelley591

You should select the background with the color select tool, then invert the selection (CTRL+I) and there you go, you have selected the entire foreground, including the 'grey' pixels, which actually are black pixels with transparency.

10% popularity Vote Up Vote Down


 

@Merenda852

The gray pixels aren't grey, they are partially transparent black pixels. If you replace black, you want to keep that partial transparency because this is what gives smooth edges. And there is an easy solution:


Set the alpha-lock of the layer (this is the checkerboard icon at the top of the Layers list).
Do not use selection.
Bucket-fill the layer with the required color. The alpha-lock will preserve the opacity of the pixels.


A different solution (that gives a strictly identical result):


On the foreground layer: Layer>Transparency>Alpha to selection
Hide/Discard the foreground layer
Add a new transparent layer
Bucket-fill the selection on that layer.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme