2020.08.16 02:02 "[Tiff] Problems with Photoshop when a file is written is strips", by David C. Partridge

2020.08.16 19:11 "Re: [Tiff] Problems with Photoshop when a file is written is strips", by Bob Friesenhahn

According to tiffinfo posted earlier, the file broken.tif uses Floating Point predictor (Tag 317: 3) with 16 bit unsigned integer data. The file is corrupt. Maybe Photoshop forgot to write the SampleFormat tag or wrote a wrong Predictor tag?

Well, that is indeed interesting. What is also interesting is this message:

"AdobeDeflate compression support is not configured."

This is what tiffinfo shows for what should be a valid 16-bit float TIFF using a predictor:

TIFF Directory at offset 0x8 (8)
   Subfile Type: (0 = 0x0)
   Image Width: 429 Image Length: 640
   Resolution: 72, 72 pixels/inch
   Bits/Sample: 16
   Sample Format: IEEE floating point
   Compression Scheme: AdobeDeflate
   Photometric Interpretation: RGB color
   Orientation: row 0 top, col 0 lhs
   Samples/Pixel: 3
   Rows/Strip: 407
   Planar Configuration: single image plane
   Software: Adobe Photoshop CS2 Macintosh
   DateTime: 2005:04:11 15:39:22

I am suspecting that perhaps David C. Partridge's libtiff is very old and it is lacking some essential features (such as AdobeDeflate compression).

The modern tiffinfo does not report anything about the predictor, although tiffdump does. This is what tiffdump says about a file here:

Waterfall FP16 ZIP Pred Interleaved Win.tif:
Magic: 0x4949 <little-endian> Version: 0x2a <ClassicTIFF>
Directory 0: offset 8 (0x8) next 0 (0)
SubFileType (254) LONG (4) 1<0>
ImageWidth (256) SHORT (3) 1<429>
ImageLength (257) SHORT (3) 1<640>
BitsPerSample (258) SHORT (3) 3<16 16 16>
Compression (259) SHORT (3) 1<8>
Photometric (262) SHORT (3) 1<2>
StripOffsets (273) LONG (4) 2<32808 902464>
Orientation (274) SHORT (3) 1<1>
SamplesPerPixel (277) SHORT (3) 1<3>
RowsPerStrip (278) SHORT (3) 1<407>
StripByteCounts (279) LONG (4) 2<869655 446788>
XResolution (282) RATIONAL (5) 1<72>
YResolution (283) RATIONAL (5) 1<72>
PlanarConfig (284) SHORT (3) 1<1>
ResolutionUnit (296) SHORT (3) 1<2>
Software (305) ASCII (2) 30<Adobe Photoshop CS2 Maci ...>
DateTime (306) ASCII (2) 20<2005:04:11 15:39:22\0>
Predictor (317) SHORT (3) 1<3>
SampleFormat (339) SHORT (3) 3<3 3 3>
700 (0x2bc) BYTE (1) 15575<0x3c 0x3f 0x78 0x70 0x61 0x63 0x6b 0x65 0x74 0x20 0x62 0x65 0x67 0x69 0x6e 0x3d 0x22 0xef 0xbb 0xbf 0x22 0x20 0x69 0x64 ...>
33723 (0x83bb) LONG (4) 2<540 131074>
34377 (0x8649) BYTE (1) 16332<0x38 0x42 0x49 0x4d 0x4 0x4 00 00 00 00 00 0x7 0x1c 0x2 00 00 0x2 00 0x2 00 0x38 0x42 0x49 0x4d ...>
34665 (0x8769) LONG (4) 1<1349252>
ICC Profile (34675) UNDEFINED (7) 496<00 00 0x1 0xf0 0x41 0x44 0x42 0x45 0x2 0x10 00 00 0x6d 0x6e 0x74 0x72 0x52 0x47 0x42 0x20 0x58 0x59 0x5a 0x20 ...>

Bob

Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt