7.0.10-4 - Tiff to PDF - Insufficient data for an image - Adobe Acrobat Reader DC

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.
Locked
PiK
Posts: 3
Joined: 2020-03-29T15:46:26-07:00
Authentication code: 1152

7.0.10-4 - Tiff to PDF - Insufficient data for an image - Adobe Acrobat Reader DC

Post by PiK »

CentOS 7.7 x86_64
ImageMagick-7.0.10-4.x86_64.rpm and ImageMagick-libs-7.0.10-4.x86_64.rpm
RPMs have been downloaded from: https://www.imagemagick.org/download/beta/
Adobe Acrobat Reader DC 2020.006.20042, Windows 10 64bit

The command 'convert input.tif output.pdf' results in pdf file which cannot be properly opened by Acrobat Reader DC. The following error is displayed by the Reader: "Insufficient data for an image".
The issue is reproducible 100% times with every file which I tried to convert.

User avatar
fmw42
Posts: 26383
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: 7.0.10-4 - Tiff to PDF - Insufficient data for an image - Adobe Acrobat Reader DC

Post by fmw42 »

Post one of your tiff files so we can test with it.

PiK
Posts: 3
Joined: 2020-03-29T15:46:26-07:00
Authentication code: 1152

Re: 7.0.10-4 - Tiff to PDF - Insufficient data for an image - Adobe Acrobat Reader DC

Post by PiK »

One of the "not working" tif files:
https://drive.google.com/file/d/1rl4F2L ... sp=sharing

User avatar
fmw42
Posts: 26383
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: 7.0.10-4 - Tiff to PDF - Insufficient data for an image - Adobe Acrobat Reader DC

Post by fmw42 »

I get your same issue with IM 7.0.10.3 Q16 Mac OSX Sierra and Acrobat Reader. Your TIF file is grayscale with alpha.

This fails:

Code: Select all

magick input.tif x.pdf
But this works if you convert to truecoloralpha or remove the alpha and convert to tricolor

Code: Select all

magick input.tif -type truecoloralpha x.pdf

I believe there might be a bug for grayscale image.

PiK
Posts: 3
Joined: 2020-03-29T15:46:26-07:00
Authentication code: 1152

Re: 7.0.10-4 - Tiff to PDF - Insufficient data for an image - Adobe Acrobat Reader DC

Post by PiK »

Thanks @fmw42.
You are right. There is an issue with grayscale input files. The colour ones are OK. Your workaround also works for me.
Should I fill the issue on the github?

User avatar
magick
Site Admin
Posts: 11254
Joined: 2003-05-31T11:32:55-07:00

Re: 7.0.10-4 - Tiff to PDF - Insufficient data for an image - Adobe Acrobat Reader DC

Post by magick »

The image includes a 3 channel ICC profile which is incompatible with a one channel gray image. Add +strip to your command line to remove the errant color profile and return a proper PDF:

Code: Select all

magick input.tif +strip x.pdf

Locked