bug in -black-threshold & -white-threshold vs documentation
Posted: 2009-09-16T19:27:30-07:00
The options page documentation for -black-threshold says:
"Force to black all pixels at or below the threshold while leaving all pixels above the threshold unchanged."
And for -white-threshold says:
"Force to white all pixels at or above the threshold."
But the code says for -black-threshold:
if ((MagickRealType) q->red < threshold.red)
q->red=(Quantum) 0;
And for -white-threshold:
if (((channel & RedChannel) != 0) &&
((MagickRealType) q->red > threshold.red))
q->red=(Quantum) QuantumRange;
So the documentation says that the black-point and white-point are inclusive of what is changed to black or white, but the code says that it they are exclusive.
If the options page documentation is indeed wrong, let me know and I will go ahead and fix it.
"Force to black all pixels at or below the threshold while leaving all pixels above the threshold unchanged."
And for -white-threshold says:
"Force to white all pixels at or above the threshold."
But the code says for -black-threshold:
if ((MagickRealType) q->red < threshold.red)
q->red=(Quantum) 0;
And for -white-threshold:
if (((channel & RedChannel) != 0) &&
((MagickRealType) q->red > threshold.red))
q->red=(Quantum) QuantumRange;
So the documentation says that the black-point and white-point are inclusive of what is changed to black or white, but the code says that it they are exclusive.
If the options page documentation is indeed wrong, let me know and I will go ahead and fix it.