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
white-threshold
Re: white-threshold
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
viewtopic.php?f=1&t=12584&hilit=white+threshold
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
viewtopic.php?f=1&t=12584&hilit=white+threshold
Re: white-threshold
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.
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.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: white-threshold
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
Note your syntax is old. In future, use
convert inputimage -white-threshold 1 outputimage
see
http://www.imagemagick.org/Usage/basics/#why