TIFF and LibTiff Mail List Archive

2002.04.08 20:18 "TIFF_BYTE fields", by Dwight Kelly

I think I've found a problem in the tag writing code for fields of type TIFF_BYTE. If a TIFF_BYTE tag has a length of 1-4 bytes, the value gets written to the offset field of the tag in the directory. According to the TIFF 6.0 spec, the bytes are 'left-justified'.

The libtiff routine TIFFWriteByteArray() seems to assume that the variable is always 32-bits and will not work correctly for a uint8 variable and a TIFF_BYTE field with length = 1.

I'm working on a fix but wanted to see if anyone else has noticed the problem.

Dwight Kelly
Apago, Inc.
4080 McGinnis Ferry Rd Suite 601
Alpharetta, GA 30005
voice:(770) 619-1884 fax:(770) 619-1885
email: web: