AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
December 2009

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2009.12.28 16:28 "bug in tiff2pdf, when handling Lab images", by Manlio Perillo
2009.12.28 16:59 "Re: bug in tiff2pdf, when handling Lab images", by Lee Howard
2009.12.28 17:12 "Re: bug in tiff2pdf, when handling Lab images", by Manlio Perillo
2009.12.28 17:44 "Re: bug in tiff2pdf, when handling Lab images", by Lee Howard
2009.12.28 17:51 "Re: bug in tiff2pdf, when handling Lab images", by Manlio Perillo
2009.12.28 17:56 "Re: bug in tiff2pdf, when handling Lab images", by Sergius Bobrovsky
2009.12.28 18:43 "Re: bug in tiff2pdf, when handling Lab images", by Toby Thain
2009.12.28 19:07 "Re: bug in tiff2pdf, when handling Lab images", by Toby Thain
2009.12.28 18:55 "Re: bug in tiff2pdf, when handling Lab images", by Sergius Bobrovsky
2009.12.28 19:46 "Re: bug in tiff2pdf, when handling Lab images", by Manlio Perillo
2009.12.28 19:52 "Re: bug in tiff2pdf, when handling Lab images", by Sergius Bobrovsky

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

Manlio Perillo wrote:
>> 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;
-			buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
-			written += t2pWriteFile(output, (tdata_t) buffer, buflen);
 			written += t2pWriteFile(output, (tdata_t) "/Range ", 7);
 			buflen=sprintf(buffer, "[%d %d %d %d] \n", 
 				t2p->pdf_labrange[0],