IM 6.8.1.9 both look correct
im6819 convert -size 256x256 gradient: -black-threshold 50% -level 50x100% -negate 1tmp1_6819.png
![Image](http://www.fmwconcepts.com/misc_tests/white_threshold_bug/1tmp1_6819.png)
im6819 convert -size 256x256 gradient: -white-threshold 50% -level 0x50% 1tmp2_6819.png
![Image](http://www.fmwconcepts.com/misc_tests/white_threshold_bug/1tmp2_6819.png)
IM 6.8.5.6 black-threshold look correct; white-threshold does not
convert -size 256x256 gradient: -black-threshold 50% -level 50x100% -negate 1tmp1_6856.png
![Image](http://www.fmwconcepts.com/misc_tests/white_threshold_bug/1tmp1_6856.png)
convert -size 256x256 gradient: -white-threshold 50% -level 0x50% 1tmp2_6856.png
![Image](http://www.fmwconcepts.com/misc_tests/white_threshold_bug/1tmp2_6856.png)
Here is a simpler test. There seems to be a nonlinear vs linear grayscale difference now compared to before.
6.8.1.9
im6819 convert -size 256x256 gradient: -black-threshold 50% 2tmp1_6819.png
im6819 convert -size 256x256 gradient: -white-threshold 50% 2tmp2_6819.png
![Image](http://www.fmwconcepts.com/misc_tests/white_threshold_bug/2tmp2_6819.png)
6.8.5.6
convert -size 256x256 gradient: -black-threshold 50% 2tmp1_6856.png
![Image](http://www.fmwconcepts.com/misc_tests/white_threshold_bug/2tmp1_6856.png)
convert -size 256x256 gradient: -white-threshold 50% 2tmp2_6856.png
![Image](http://www.fmwconcepts.com/misc_tests/white_threshold_bug/2tmp2_6856.png)
If I create a linear gradient, then the latter test works fine. (As does the first test set at the top)
6.8.1.9
im6819 convert -size 256x256 gradient: -black-threshold 50% 3tmp1_6819.png
im6819 convert -size 256x256 gradient: -white-threshold 50% 3tmp2_6819.png
![Image](http://www.fmwconcepts.com/misc_tests/white_threshold_bug/3tmp2_6819.png)
6.8.5.6
convert -size 256x256 gradient: -black-threshold 50% 3tmp1_6856.png
![Image](http://www.fmwconcepts.com/misc_tests/white_threshold_bug/3tmp1_6856.png)
convert -size 256x256 gradient: -white-threshold 50% 3tmp2_6856.png
![Image](http://www.fmwconcepts.com/misc_tests/white_threshold_bug/3tmp2_6856.png)
It is strange to me that for non-linear gradient (or grayscale image), -black-threshold works fine but -white-threshold does not in my first pair of examples above. Perhaps this is just colorspace management. But why did it change. I thought gradients were supposed have the same data content.