Received: by whizzer.wpd.sgi.com (/911001.SGI)
	 id AA12337; Tue, 16 Nov 93 09:59:58 GMT
Received: from sgi.sgi.com by whizzer.wpd.sgi.com via SMTP (/911001.SGI)
	for /usr/people/sam/majordomo/wrapper resend -l tiff -h sgi.sgi.com -f tiff-owner -s -m "-oi -odq -om" tiff-list id AA12330; Tue, 16 Nov 93 01:59:55 -0800
Received: from goliath.unda.fi by sgi.sgi.com via SMTP (931106.SGI.IRIX4/910110.SGI)
	for tiff-relay@whizzer.wpd.sgi.com id AA15127; Tue, 16 Nov 93 01:59:33 -0800
Received: from unda.fi (titan.unda.fi) by goliath.unda.fi (5.65c/93.6.3-MAI)
	id AA10030; Tue, 16 Nov 1993 11:55:46 +0200
Received: from myy.unda.fi by unda.fi (4.1/MAI-93.4.15)
	id AA06582; Tue, 16 Nov 93 11:54:57 +0200
Date: Tue, 16 Nov 93 11:54:57 +0200
From: oraisa@unda.fi (Olli Raisa)
Message-Id: <9311160954.AA06582@unda.fi>
To: tiff@sgi.sgi.com
Subject: Decompressing images having 5 samples per pixel
Cc: olli@unda.fi
X-Sun-Charset: US-ASCII
Sender: tiff-owner@sgi.sgi.com


Libtiff may have a bug in decompressing images having more than 4 samples
per pixel. Below you will find more detailed information of a file that
is written by PhotoShop 2.5 (Macintosh). If the image is written without
compression I can read it with libtiff 3.30beta (SunOS 5.2) correctly. 
With LZW compression I get vertical stripes in a part of the image.

Olli Raisa
Unda Oy

BTW, what is the status of JPEG compression in libtiff?

--

olli@myy % tiffinfo photoshop.tif
photoshop.tif: Warning, unknown field with tag 34377 (0x8649) ignored.
TIFF Directory at offset 0x8
  Subfile Type: (0 = 0x0)
  Image Width: 200 Image Length: 200
  Resolution: 20, 20 pixels/inch
  Bits/Sample: 8
  Compression Scheme: Lempel-Ziv & Welch encoding
  Photometric Interpretation: RGB color
  Extra Samples: 2<unspecified, unspecified>
  Predictor: horizontal differencing
  Samples/Pixel: 5
  Rows/Strip: 8
  Planar Configuration: single image plane

olli@myy % /p/bin/tiffdump photoshop.tif
photoshop.tif:
Magic: 0x4d4d <big-endian> Version: 0x2a
Directory 0: offset 8 (0x8)
SubFileType (254) LONG (4) 1<0>
ImageWidth (256) SHORT (3) 1<200>
ImageLength (257) SHORT (3) 1<200>
BitsPerSample (258) SHORT (3) 5<8 8 8 8 8>
Compression (259) SHORT (3) 1<5>
Photometric (262) SHORT (3) 1<2>
StripOffsets (273) LONG (4) 25<872 1734 2604 3470 4350 5216 6180 7186 8168 9140 10098 11054 11996 12932 13874 14826 15778 16734 17694 18668 19696 20602 21476 22346 23214>
SamplesPerPixel (277) SHORT (3) 1<5>
RowsPerStrip (278) SHORT (3) 1<8>
StripByteCounts (279) LONG (4) 25<861 869 865 880 866 964 1006 981 971 958 956 941 936 941 951 952 956 959 974 1028 906 874 869 867 857>
XResolution (282) RATIONAL (5) 1<20>
YResolution (283) RATIONAL (5) 1<20>
PlanarConfig (284) SHORT (3) 1<1>
ResolutionUnit (296) SHORT (3) 1<2>
Predictor (317) SHORT (3) 1<2>
ExtraSamples (338) BYTE (1) 2<0x00 0x00>
34377 (0x8649) BYTE (1) 428<0x244c8 0x244c9 0x244ca 0x244cb 0x244cc 0x244cd 0x244ce 0x244cf 0x244d0 0x244d1 0x244d2 0x244d3 0x244d4 0x244d5 0x244d6 0x244d7 0x244d8 0x244d9 0x244da 0x244db 0x244dc 0x244dd 0x244de 0x244df 0x244e0 0x244e1 0x244e2 0x244e3 ...


