Page 1 of 1

white-threshold

Posted: 2008-12-09T19:11:38-07:00
by ursubaloo
In a previous version of ImageMagick the following code would convert every pixel that wasn't fully black to white from the command line:

convert -white-threshold 1 zimage.png zimage.png

That no longer works, now the result of that call is an all-black canvas.
I've tried alternatives I've found by searching these forums, but none of the following seem to work:

convert input.jpg -white-threshold 57825 output.jpg
convert input.jpg -white-threshold 88% output.jpg

Variations of them all result in a black canvas. Is this a bug or am I a noob?

Help plx :)

Re: white-threshold

Posted: 2008-12-09T20:18:57-07:00
by ursubaloo
I think it's a a bug. I've found ImageMagick 5.5.7 and the command I first posted works as it should.

Did anyone else try this and have the same problem? If so I guess move to bugs section.

I remember reading a post from 2006 where this was broken and supposedly fixed in the following version. I guess it got broke again :P

viewtopic.php?f=1&t=12584&hilit=white+threshold

:P

Re: white-threshold

Posted: 2008-12-09T20:25:38-07:00
by ursubaloo
While I'm posting here I figure I might as well ask another question.

I've noticed that when trying to use the "convert" function from command-line in other folders via the PATH variable, there is a conflict with the "convert" function from system32 which is used to format drives.

I've just renamed the imagemagick convert to converti, but I was wondering if there's any more elegant work-around that I'm not aware of.

Thanks.

Re: white-threshold

Posted: 2008-12-09T20:29:13-07:00
by fmw42
I ran your white-threshold test (with correct syntax) but it fails for me, too. I suggest posting at Bugs forum.

Note your syntax is old. In future, use

convert inputimage -white-threshold 1 outputimage

see

http://www.imagemagick.org/Usage/basics/#why