7
APPENDIX
7-20
TMPM5200-2
■
Header-data structure
The structure of header data in the standard TIFF files is as follows.
Address
Note
0x0000 Byte
order
0x0002
TIFF format version number
0x0004
0x0006
Pointer to 1
st
Directory
Byte order:
“
II
”
(0x4949) Intel Format (LSB
→
MSB)
■
Directory-data structure
Directory
The directory in TIFF files consists of multiple TAGs as shown below.
Number of TAGs
TAG [1]
TAG [2]
:
TAG [N]
Pointer to next directory
Pointer to next directory becomes Null unless there is a directory after this one.
TAG
TAGs can record various parameters of TIFF images.
Structure of TAG
TAG type
Kind of TAG
Specified by the number 0x00FF to 0x012D in accordance with the TIFF
specifications.
Data type
Type of TAG information data
0x0001 : byte (8 bits)
,
0x0002 : ASCII (8 bits)
0x0003 : short (16 bits)
,
0x0004 : long (32 bits)
0x0005 : rational (Long
×
2 )
Length of data
Length of TAG data (specified by the number of units)
For instance, the length of data 1 for the data type long is 32 bits (4 bytes).
Data or pointer
TAG data or pointer
If the length of TAG data is below 4 bytes, the data is stored here and if it
is above 4 bytes, a pointer is stored.