TIFF and LibTiff Mail List Archive


2003.04.08 14:04 "please help with LZW", by Hailin Shen
2003.04.08 14:24 "RE: please help with LZW", by Carter John-jcarte01
2003.04.08 18:46 "RE: please help with LZW", by
2003.04.09 21:40 "Newbie Question (Offset value)", by Harring Figueiredo
2003.04.09 23:20 "trouble with LZW bit order", by Hailin Shen
2003.04.10 13:20 "Re: Newbie Question (Offset value)", by Greg Roberts
2003.04.10 14:28 "Re: Newbie Question (Offset value)", by Phillip Seaver
2003.04.11 21:34 "Re: Newbie Question (Offset value)", by Harring Figueiredo

2003.04.08 14:24 "RE: please help with LZW", by Carter John-jcarte01


I'm not sure about 12 bit (my code only works for 1,4,8,and 24) but my [limited :-)] understanding would be that the LZW codes refer to H diffed color map indexes.


  1. you should decode the LZW codes this should produce a list of H diffed color map indecies (i think how h diff works) is that the 1st is a real index, the second is the difference between the 1st and second. is the 3rd the diff from the 1st or 2nd (i'm not sure) so
  2. produce a list of corrected colour map indecies

if you want send on the tiff file and i'll see what i can do I'd be curious as how how long it would be before my pc blue screened :-')


-----Original Message-----

Dear All,

I have a project in image analysis. The images I got are essentially multipage tiff format with private tags. Image data are compressed with LZW and preprocess by horizontal differencing. The bit per sample is 16. But I was told images are 512*512*12bit. 512*512 is the size of image.

I wonder what the LZW characters are for data after horizontal differencing for my case, since data could be positive or negative. At the position of stripoffsets, the hex number are '80 07 80 0F 17 F8 24 00 E8 7F 85 ....', ' 80 05 C0 27 A7 FB B9 FE 9E 00 1A ...' I could not figure out how to decode properly with clear code 256. File format is IEEE little-endian format. Any information is welcome!

The project is completely for academic study.

Thanks in advance for your kind help.