AWARE [SYSTEMS]
AWare Systems, , Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
December 2006

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
Archive maintained by AWare Systems



New Datamatrix section



Valid HTML 4.01!



Thread

2006.12.20 13:24 "Interpreting values in tdir_offset of TIFFDirEntry", by <mikk@go2.pl>
2006.12.26 10:10 "Re: Interpreting values in tdir_offset of TIFFDirEntry", by Andrey Kiselev

2006.12.20 13:24 "Interpreting values in tdir_offset of TIFFDirEntry", by <mikk@go2.pl>

Hello,

I'm not sure I understand the way of interpreting values stored in the 
tdir_offset of TIFFDirEntry structure. According to the tiff.h comments 
for the TIFFDirEntry struct:
"...If the value is 4 bytes or less, then it is placed in the offset 
field to save space. If the value is less than 4 bytes, it is 
left-justified in the offset field."
When the IFD entry (a tag) is written into a TIFF file, and the data 
type size is 2 bytes (fe. TIFF_SHORT), and data length is 2, that makes 
4 bytes of data. I assume that the data itself is saved in the 
tdir_offset field. And what if the data type size is 1 byte (fe. 
TIFF_ASCII or TIFF_BYTE) and data length is less than or equal to 4? I 
assume that the data itself is saved in the tdir_offset. Am I right?

Thanks in advance,
mikk