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 editing an image in GIMP that has a few nearly-transparent (resp. very light) pixels scattered through an otherwise transparent (resp. pure white) background.

Is there a command that will quickly highlight or otherwise indicate pixels that are not the background color (i.e. white or transparent, depending on whether there's an alpha channel), so that I can clear them?

(I could just set the similar-color threshold to 0 and flood-fill, but that takes many clicks, and I have to either duplicate the layer first or remember where all the stray pixels are.)

share|improve this question
2  
In Photoshop you could load the alpha channel of the layer as a selection and as long as the stray pixels are more than 50% opaque, they'd get highlighted by the selection marquee. –  nine9ths Dec 1 '12 at 5:21
    
In Paint.NET you can select the background region with the wand tool using 0% tolerance, then invert selection and deselect the foreground object manually. Sorry that I don't know Gimp well enough to answer this for real. –  FizzledOut Dec 9 '13 at 0:02

1 Answer 1

You can use the Select By color tool with the Threshold set to 0:

enter image description here

Click where you know there is only white/transparency, and all of that color will be selected.

share|improve this answer
    
Perhaps, after this operation, you can increase the selection by 1 px. –  Paolo Gibellini Feb 5 at 8:58
    
@PaoloGibellini I'm not sure how that would help, (it would probably just select everything, which you can do with Ctrl+A). If you want to select only the non-background pixels, invert the selection (Ctrl+I) after following the steps in my answer. –  gandalf3 Feb 5 at 20:06
    
Usually in a "nearly-transparent" grainy background (coming for example from a scanning) the points to be removed are "clusters" of points with different values. With a treshold of 0 you select just a value. Increasing the selection usually gets the entire "cluster" (it doesn't select everything). Other way is select with the magic wand the background, increase the selection until the "nearly-transparent" points are included and replace the entire background. –  Paolo Gibellini Feb 6 at 7:48
    
@PaoloGibellini Oh. I see what you are saying now. Yes, that is useful. For some reason I was thinking the OP's entire image was transparent with a few "nearly transparent" pixels.. But that would be silly as you could just select all and delete. :P –  gandalf3 Feb 6 at 8:07

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.