TIFF and LibTiff Mail List Archive

1999.05.20 18:48 "LZW Decode Problem", by Mark Johnson

I am new to this list so if this is a FAQ I apologize.

I am having difficulty reading LZW compressed separated (Photometric == 5) images with SamplesPerPixel > 4. I am running v3.4beta036 on a SPARCstation with Solaris 2.5.1.

These are CMYK images with mask data in the extra samples apparently written by PhotoShop. The first part of each scanline decodes just fine. Then suddenly at the same horizontal position in each line the decoding goes haywire. Beyond that point the image is still discernable but the colors are all wrong with most pixels being various shades of gray or near gray. The horizontal position at which the decoding starts to fail appears to be related to ImageWidth and SamplesPerPixel (ImageWidth * (SamplesPerPixel - 2) / SamplesPerPixel).

Has anybody else seen this? Is it a bug or did I misconfigure libtiff when I built it?

I am really puzzled by this.