ImageMagick / ImageMagick6

🧙‍♂️ ImageMagick 6
https://legacy.imagemagick.org
Other
194 stars 80 forks source link

convert monochrome tiff to pdf produces invalid pdf #270

Open plasticassius opened 9 months ago

plasticassius commented 9 months ago

ImageMagick version

6.9.11-60

Operating system

Linux

Operating system, version and so on

Debian GNU/Linux 12 (bookworm)

Description

When converting 1 bit color depth tiff (black and white) to pdf, result will not display on Windows Adobe Reader 11.0.08.4 (with error "Insufficient data for an image). It displays with red and green instead of black and white on PDF-XChange 5.5. It displays fine on evince 43.1.

No problem when converting 8 bit color depth tiff to pdf.

Steps to Reproduce

convert -density 300 t1.tif -threshold 67% -monochrome -compress group4 t1.pdf or convert t1.tif t1.pdf

The following work ok: convert -density 300 t8.tif -threshold 67% -monochrome -compress group4 t8.pdf and convert t8.tif t8.pdf

Interestingly enough, convert -density 300 t8.tif -threshold 67% -monochrome -compress group4 t8.pdf produces a smaller pdf than convert -density 300 t1.tif -threshold 67% -monochrome -compress group4 t1.pdf

Images

t.zip

urban-warrior commented 9 months ago

Can you try the latest ImageMagick release, 6.9.12-97? If the PDF produced by that release fails, let us know.

plasticassius commented 9 months ago

I tried 6.9.12-97 Q16-HDRI in win10 and it works fine. Unfortunately the version on the Debain 12 (as well as 11) distribution is 6.9.11-60, which why I tried that version previously.