LFile::EnumTagsCallBack

Summary

The LFile::EnumTags function will call this callback for each tag present on the page.

Syntax

#include "ltwrappr.h"

virtual L_INT LFile::EnumTagsCallBack(uTag, uType, uCount)

Parameters

L_UINT16 uTag

Tag to identify the data in the TIFF file. This may be any tag specified in LFileSettings::SetTag, or any other tag added by the TIFF filter when saving the file. For example, all of the TIFF comments would generate a particular TIFF tag.

L_UINT16 uType

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).

L_UINT32 uCount

Number of elements of type uType. Note that this is not the same as the number of bytes. For example, if uCount is 10 and uType is TAG_LONG, you will need 10 x 4 = 40 bytes to read the tag data.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

The LFile::EnumTags function calls this callback for each tag in the page. For more information, refer to LFile::EnumTags.

Do not attempt to use the LFile::DeleteTag function to delete tags from inside an LFile::EnumTagsCallback callback function. If you want to delete tags that you enumerate, use LFile::EnumTagsCallback to add the tags to a list. Upon returning from LFile::EnumTags, you can delete all the tags from the list.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

For an example, refer to LFile::EnumTags.

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

LEADTOOLS Raster Imaging C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.