LEADFILETAG

typedef struct _LEADFILETAG 
{ 
   L_UINT16 uTag; 
   L_UINT16 uType; 
   L_UINT uCount; 
   L_UINT uDataSize; 
   L_SIZE_T uDataOffset; 
}LEADFILETAG, *pLEADFILETAG; 

The LEADFILETAG structure contains information about a file tag or Geo Key. A pointer to an array of this structure is obtained by the L_ReadFileTags and L_ReadFileGeoKeys functions.

Members

uTag

When used with the L_ReadFileTags function, the ID of this tag. Examples of registered tags are:

Value Meaning
0x8298 Copyright comment
0x8769 General Exif comments
0x8825 Exif GPS comments

When used with the L_ReadFileGeoKeys function, the ID of this Geo key. Values of the GeoKey ID range between 0 and 65535. Possible ranges are:

Value Meaning
Range Meaning
0..1023 GeoTIFF configuration keys
1024..2047 Do not use; reserved for future use
2048..3071 Geographic/Geocentric CS Parameter Keys
3072..4095 Projected CS Parameter Keys
4096..5119 Vertical CS Parameter keys
5120..32767 Reserved
32768..65535 Private use to store your own data

uType

When used with L_ReadFileTags, the tagged data type. Valid values are:

Value Meaning
TAG_BYTE [1] Byte.
TAG_ASCII [2] Byte in the range of 0 to 255.
TAG_SBYTE [6] Byte used as signed number in the range of -128 to +127.
TAG_UNDEFINED [7] Byte, with application-defined usage.
TAG_SHORT [3] Two bytes, unsigned.
TAG_SSHORT [8] Two bytes, signed.
TAG_LONG [4] Four bytes, unsigned.
TAG_SLONG [9] Four bytes, signed.
TAG_RATIONAL [5] Eight bytes, used as a pair of unsigned long integers, where the first number is the numerator and the second is the denominator of a fraction.
TAG_SRATIONAL [10] Eight bytes, used as a pair of signed long integers, where the first number is the numerator and the second is the denominator of a fraction.
TAG_FLOAT [11] Four bytes used as a floating point number.
TAG_DOUBLE [12] Eight bytes used as a double-precision floating point number.
TAG_IFD [13] 32-bit IFD offset.
TAG_LONG8 [16] Unsigned 64-bit integer (valid only for BigTIFF formats).
TAG_SLONG8 [17] Signed 64-bit integer (valid only for BigTIFF formats).
TAG_IFD8 [18] 64-bit IFD offset (valid only for BigTIFF formats).

When used with L_ReadFileGeoKeys, the type of GeoKey to set. This indicates whether the data pointed to by ppData is SHORT, DOUBLE or ASCII. Possible values are:

Value Meaning
TAG_ASCII [2] The data pointed to by pData is an array of ASCII bytes.
TAG_SHORT [3] The data pointed to by pData is an array of SHORT values (2 bytes each).
TAG_DOUBLE [12] The data pointed to by pData is an array of floating points in DOUBLE format (8 bytes each).
TAG_IFD [13] 32-bit IFD offset.
TAG_LONG8 [16] Unsigned 64-bit integer (valid only for BigTIFF formats).
TAG_SLONG8 [17] Signed 64-bit integer (valid only for BigTIFF formats).
TAG_IFD8 [18] 64-bit IFD offset (valid only for BigTIFF formats).

uCount

Count of data items, based on the tagged data type. For example, if the buffer size is 16 and the data type is TAG_DOUBLE, the count is 2.

uDataSize

The number of bytes in the data items.

uDataOffset

Byte offset into the ppData variables where the data for this item starts. To read the data for this item, you can use pItemData = (ppData + uDataOffset)

Comments

pLEADFILETAG is a pointer to a LEADFILETAG structure. Where the function parameter type is pLEADFILETAG, you can declare a LEADFILETAG variable, update the structure's fields, and pass the variable's address in the parameter. Declaring a pLEADFILETAG variable is necessary only if your program requires a pointer.

Pass an address to pLEADFILETAG to L_ReadFileTags or L_ReadFileGeoKeys to read all the tags or geo keys stored in an image file. These functions will allocate this pointer with an array of pLEADFILETAG structures, one for each item found. When you are done using the pLEADFILETAG pointer, you must pass it to the L_FreeFileTags to free the allocated memory.

Help Version 21.0.2023.2.15
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.