2009.12.28 19:46 "Re: [Tiff] bug in tiff2pdf, when handling Lab images", by Manlio Perillo

2009.12.28 17:44 "Re: [Tiff] bug in tiff2pdf, when handling Lab images", by Lee Howard

Are you sure that this is the problem? Are you sure that it's not something else?

Yes, I'm sure.

Try to convert this image: http://www.colour.org/tc8-03/images/ski_pg/Ski_TC8-03_abs.tif

It will fails to open with Acrobat Reader.

Ghostscript will report an human readable error:

File has an unbalanced >> (close dictionary).

Removing the duplicate [0.9643 1.0000 0.8251] solves the problem; since it is not valid PDF syntax.

Works for me. Attached is the patch that you should hang on Bugzilla in a new bug report.

Thanks,

Lee.

--- tiff-3.9.2.orig/tools/tiff2pdf.c 2009-12-22 12:45:49.000000000 -0800 +++ tiff-3.9.2/tools/tiff2pdf.c 2009-12-28 09:36:11.966751712 -0800 @@ -4734,14 +4737,6 @@

                        Y_W = 1.0F;
                        buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
                        written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-                       X_W = 0.3457F; /* 0.3127F; */ /* D50, commented D65 */
-                       Y_W = 0.3585F; /* 0.3290F; */
-                       Z_W = 1.0F - (X_W + Y_W);
-                       X_W /= Y_W;
-                       Z_W /= Y_W;
-                       Y_W = 1.0F;

                                t2p->pdf_labrange[0],