Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
They should be channel sensitive, but as only the red channel is in use (all other channels have 0 values) it should not matter for this image.
However does not look like the black-threshold is correct. The threshold point should be in the same place in BOTH images, but containing the unmodified gradient below that point in one and above that point in the other.
I really should document these with examples in IM examples. Probably by adding a second 'threhold' discussion in Colors, directly after 'negate', with a different enphesis to its discussion in Quantization as a very primative color reduction/dither operator. Maybe one day!
anthony wrote:They should be channel sensitive, but as only the red channel is in use (all other channels have 0 values) it should not matter for this image.
However does not look like the black-threshold is correct. The threshold point should be in the same place in BOTH images, but containing the unmodified gradient below that point in one and above that point in the other.
Black threshold was 25% and white threshold was 75%. Why should they be at the same place?
The black threshold should be at 25%, but appears more like 75%. It should really be black up to a quarter from the bottom and red gradient from there to top.
The white threshold is wrong also as compare shows it to be identical to the original gradr.png
So both black-threshold and white-threshold seem bogus!
Given a channel of red and a threshold of 25%, black thresholding compares the grayscale value of each pixel to the threshold and if its less it sets the red channel of the pixel to 0. If you want to just threshold the red channel you need to specify the threshold like this: 25%,0%,0%.
I would expect gray to be used for the default (all channels, including the 'default channel flag') Forcing the result to be black and white for color images.
But if the user specified channels (no default channel flag is present) then individual channels will be used for BOTH the test and the action.