[6.7.7] "monochrome" switch not working

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
qwpa
Posts: 2
Joined: 2012-06-03T15:50:33-07:00
Authentication code: 13

[6.7.7] "monochrome" switch not working

Post by qwpa »

Up until 6.7.6 I always used the following command to convert a .PDF file to monochrome .TIFF files :

Code: Select all

convert -antialias -monochrome -density 300x300 -units pixelsperinch test.pdf test-%04d.tiff
But in 6.7.7 the command no longer works: it produces RGB .TIFF files instead of monochrome .TIFF files. I believe it's a bug.

Code: Select all

convert --version
Version: ImageMagick 6.7.7-2 2012-06-03 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features:  OpenCL   
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: [6.7.7] "monochrome" switch not working

Post by fmw42 »

You syntax is not really correct for IM 6 (-monochrome should be after the pdf), but that should not really matter. I don't think -antialias is meaningful in this usage, I think it is only for drawing text. But it should not hurt to have it.

But in IM 6.7.7.6 beta on Mac OSX Tiger, I do not have any trouble with doing the following:

# create pdf
convert logo: logo.pdf

# process pdf to tiff using -monochrome
convert -density 300x300 -units pixelsperinch logo.pdf -monochrome logo2.tiff

The result is binary. Note that -monochrome will produce dither pattern.

see
http://www.imagemagick.org/Usage/basics/#cmdline
http://www.imagemagick.org/script/comma ... #antialias
http://www.imagemagick.org/Usage/quantize/#monochrome

Perhaps you should either provide your pdf image or upgrade to a later version of IM.
qwpa
Posts: 2
Joined: 2012-06-03T15:50:33-07:00
Authentication code: 13

Re: [6.7.7] "monochrome" switch not working

Post by qwpa »

I think that my problem is the same one described here : viewtopic.php?f=3&t=21119

Apparently 6.7.7-2 has a bug involving monochrome TIFF images, and the bug was solved in 6.7.7-4 (or at least that's what I understood -- I might be wrong). I am building from the MacPorts version (because I am not savvy enough to build manually) and unfortunately they don't have anything newer than 6.7.7-2. For now, I downgraded to 6.7.6-9, which works without problems.

Anyway, thank you for your comments about the switches.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: [6.7.7] "monochrome" switch not working

Post by anthony »

fmw42 wrote:You syntax is not really correct for IM 6 (-monochrome should be after the pdf
Actually from my recent studies in preparation for IMv7 changes, I learned that in one case monochrome was being used as a setting, and not as a pure operator it should be. In PDF reading.

This I thought was silly and really should be removed as a setting, or replaced with the appropriate '-type' setting.


In any case Fred is right. Monocrome should be after the PDF, and is essentially a 'dither with black and white colors only'. In a quantization sense... a dithered 'threshold'.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply