Monochrome option creates all white images

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
oyvind.eide

Monochrome option creates all white images

Post by oyvind.eide »

For some TIFF images, a convert such as:

convert -monochrome DSCF0002.tif test_ren.tif

gives a white-only output. The same happens with:

convert -threshold 0 -verbose DSCF0002.tif test_ren.tif

whereas this command gives a correct output:

convert -threshold 50% -verbose DSCF0002.tif test_ren.tif

So it looks like the auto-threshold does not work for this group of images. An example of such problem images may be found at:

http://folk.uio.no/oeide/DSCF0002.tif

Version info:

Solaris
Machine hardware: sun4u
OS version: 5.8
Processor type: sparc
Hardware: SUNW,Sun-Fire-880

> convert --version
Version: ImageMagick 6.2.9 09/15/06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC


--

Regards,

Øyvind Eide
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Monochrome option creates all white images

Post by anthony »

-monocrome don't work for all images.
Look at IM Examples, Two Color Quantization
http://www.imagemagick.org/Usage/quantize/#colors_two
for a alternative technique.

PS: place the operator AFTER reading the image in, not BEFORE. Yes it works, but only for one operation. More than one will not be ordered correctly.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
oyvind.eide

Re: Monochrome option creates all white images

Post by oyvind.eide »

Thank you very much, the problem is solved.

No bug after all :-)


Regards,

Øyvind Eide
Post Reply