ICC weirdness in PDF

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

ICC weirdness in PDF

Post by glennrp »

I'm not sure what is going on here. The warning comes from libpng16. Somehow
libpng is involved in reading or writing PDF files, and it's inserting an ICC profile
that libpng16 does not like.

Code: Select all

$ q16convert xc:green green.pdf
$ q16convert green.pdf null:-
q16convert: iCCP: profile 'default_rgb.icc': 0h: PCS illuminant is not D50 `/tmp/magick-19896dpRrXxuz36Gd1' @ warning/png.c/MagickPNGWarningHandler/1830.
$ q16convert -version
Version: ImageMagick 6.8.8-7 Q16 x86_64 2014-02-26 http://www.imagemagick.org
Also, the PDF is grayscale when the input is RGB:

Code: Select all

$ q16identify green.pdf
green.pdf PDF 1x1 1x1+0+0 16-bit Bilevel Gray 61B 0.000u 0:00.000
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: ICC weirdness in PDF

Post by magick »

We can reproduce the PNG problem, our PDF is runlength-encoded. Inspect the filter in green.pdf. Is it /RunLengthDecode?

We can reproduce the identify problem. Although the image does display as green, it returns Gray unless you add -verbose to the command-line. We'll investigate, but it may be a week or so. We have lots of work already in the pipe.
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: ICC weirdness in PDF

Post by glennrp »

magick wrote:We can reproduce the PNG problem, our PDF is runlength-encoded. Inspect the filter in green.pdf. Is it /RunLengthDecode?
Yes, "/Filter [ /RunLengthDecode ]" appears twice in green.pdf.
Post Reply