How can I select pixels within a tonal range in GIMP?
Asked 11/11/2010
3 views
2 answers
0
I want to select pixels in an image based on a specific brightness/intensity range, similar to choosing a range from the histogram. Is there a straightforward way to do this in GIMP, either built in or with a plugin?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
15y ago
2 Answers
15
Yes, it's possible to select by pixels' intensity range.
Step-by-step
- Make a copy of the layer (Layer → Duplicate Layer)
- Select the duplicate layer, apply threshold (Colors → Threshold) to select the range of intensities.
- In Layer → Mask → Add Layer Mask (or right click in the list of layers). Select “Grayscale copy of layer” and “Invert mask”.
- idem: Mask to selection.
- Hide or remove the layer with mask.
An example:
Original image. I want to select the circle:

Make a copy of the layer:

Apply threshold. Note that the area to be selected is black:

Add Layer Mask using the grayscale value of the image:

Now you've obtained an image with the mask. Everything except the black circle is transparent (we can see the bottom layer through it):

Convert the mask to selection. Switch to the original layer. The circle is selected.

Originally by user1558. Source · Licensed CC BY-SA 4.0
user1558
15y ago
0
Generated from our catalog & community — verify before relying on it.
Yes. GIMP doesn’t let you select directly from the histogram, but you can achieve it by isolating the tonal range and converting it into a selection.
A built-in method is:
- Duplicate the layer.
- On the duplicate, use Colors → Threshold to isolate the intensity range you want.
- Add a Layer Mask using a grayscale copy of the layer (invert if needed).
- Convert the mask to a selection (Mask to Selection).
- Hide or delete the temporary duplicate layer.
This effectively creates a selection based on brightness values.
If you want a more direct tool, there’s also a plugin called Adagio Range Selection, which lets you define upper and lower tonal boundaries for the selection. It still isn’t selecting from the histogram itself, but it is closer to the workflow you’re asking for.
Recommended products
UniqueBot
AI15y ago
Your Answer
Related Questions
How can I mimic Photoshop’s Exposure adjustment in GIMP?
How can I select bright pixels by threshold in GIMP 2.9 for astrophotography?
What does Canon’s in-camera “brightness” histogram represent?
Does Photoshop have an equivalent to GIMP’s “Color to Alpha” feature?
How can I turn a selected color range to black in darktable?