Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

I am trying to select by color in Gimp this image:

before

but when I select by the foreground color, also the antialiased pixels in the border are selected.

How to select only the foreground color in Gimp?

Thanks

share|improve this question
    
You may have to choose another threshold: graphicdesign.stackexchange.com/questions/31022/… –  Takkat Jun 24 at 13:58

2 Answers 2

up vote 1 down vote accepted

Your image is not black-on-white; it's all black with variable transparency. When you tell GIMP to select only the black pixels, it will select all the pixels, except those that are fully transparent, since as far as GIMP is concerned, those pixels are all black.

One way to make it work as you seem to expect (i.e. only select the pixels that are 100% opaque black) would be to first flatten the layer by using Layer → Transparency → Remove Alpha Channel. This will replace any transparent parts of the layer with the current background color (white, by default), turning it into an opaque black-on-white image.

That said, I'm not sure why you'd want to select only the opaque areas of the image. Whatever it is that you're trying to do, there are probably better ways to do it.

In particular, if you want to create a selection that exactly matches the outline of the image, including the anti-aliasing at the edges, you can do that with Layer → Transparency → Alpha to Selection. This will make the opaque black pixels fully selected, and the semi-transparent pixels around them partially selected, in proportion to their opacity. (The selection outline will appear somewhere in the middle of the semi-transparent area, but that's just an approximation of the true selection mask. You can see the actual selection more clearly by toggling the Quick Mask with Shift+Q.)

share|improve this answer

Under 'Tool Options' of 'Select by Color Tool' set the 'Threshold' slider to 0, it will only select exactly the same colors.

share|improve this answer
    
Unfortunately it does not work even if I think is the correct answer. –  fbrundu Jun 25 at 13:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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