gimp_threshold > gimp_drawable_threshold(): has different behavior on selection
Environment/Versions
- GIMP version: 2.10.22
- Package: official installer
- Operating System: Windows 7
Description of the bug
In older versions (at least 2.8) (gimp-threshold (car (gimp-image-get-selection img)) 0 threshold)
used to select the values of selection that are less than threshold. Now it also intersects it with the current selection, which makes it impossible to perform a threshold operation on selection.
gimp-drawable-threshold behaves the same way.
Reproduction
Is the bug reproducible? Always
Reproduction steps:
- Create a partially transparent layer
- Execute Alpha to Selection on a layer
- Open Script-Fu console and execute
(gimp-threshold (car (gimp-image-get-selection img)) 0 128)
where img is the id of the image
Expected result:
Pixels with alpha<=0.5 are selected
Actual result:
The above is intersected with the current selection.