Documentation for -threshold on http://www.imagemagick.org/script/comma ... #threshold
says:
Create an image such that any pixel sample that is equal to, or exceeds the threshold, is reassigned the maximum intensity otherwise the minimum intensity.
To generate an all-black or all-white image with the same dimensions as the input image, you can use.
convert -threshold 65535 in.png black.png
convert -threshold 0,0 in.png white.png
but when I do either of the following, I see that the histogram shows
convert -size 256x256 gradient: -threshold 0 -format %c histogram:info:
65280: (65535,65535,65535, 0) #FFFFFFFFFFFF white
256: ( 0, 0, 0, 0) #000000000000 black
convert -size 256x256 gradient: -threshold 0,0,0 -format %c histogram:info:
65280: (65535,65535,65535, 0) #FFFFFFFFFFFF white
256: ( 0, 0, 0, 0) #000000000000 black
I was expecting to see no pixels at graylevel ( 0, 0, 0, 0)
The same with the following syntax
convert -threshold 0 -size 256x256 gradient: -format %c histogram:info:
65280: (65535,65535,65535, 0) #FFFFFFFFFFFF white
256: ( 0, 0, 0, 0) #000000000000 black
I am using 6.3.6.4 and perhaps this is fixed in 6.3.6.10?
Bug in -threshold
Re: Bug in -threshold
There is patch for the problem you reported in ImageMagick 6.3.7-0 Beta available sometime tomorrow. Thanks.
Re: Bug in -threshold
Could you post the patch here, please?magick wrote:There is patch for the problem you reported in ImageMagick 6.3.7-0 Beta available sometime tomorrow. Thanks.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Bug in -threshold
This is NOT suposed to be a bug!!!!
and fixing the suposed bug interoduces a bug!
Read the option manual.
If you want to threshold everything you would use -threshold -1
and fixing the suposed bug interoduces a bug!
Read the option manual.
If you want to threshold everything you would use -threshold -1
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Bug in -threshold
Patch reverted in ImageMagick 6.3.7-1 Beta.