static L_INT LFileSettings::SetTag(uTag, uType, uCount, pData)
Specifies a private tag and the tagged data to be saved in a TIFF file.
Tag to identify the data in the TIFF file. Generally, you can specify a private tag in the range of 0x8000 to 0xFFFE. However, LEADTOOLS returns an error if you use any of the following registered tags:
|0x8769||General Exif comments|
|0x8825||Exif GPS comments|
|0x80A4||Annotation TIFF tag defined as ANNTAG_TIFF.|
Tagged data type. Valid values are:
|TAG_ASCII|| Byte in the range of 0 to 255.|
|TAG_SBYTE|| Byte used as signed number in the range of -128 to +127.|
|TAG_UNDEFINED|| Byte, with application-defined usage.|
|TAG_SHORT|| Two bytes, unsigned.|
|TAG_SSHORT|| Two bytes, signed.|
|TAG_LONG|| Four bytes, unsigned.|
|TAG_SLONG|| Four bytes, signed.|
|TAG_RATIONAL|| 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|| 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|| Four bytes used as a floating point number.|
|TAG_DOUBLE|| Eight bytes used as a double-precision floating point number.|
|TAG_IFD|| 32-bit IFD offset.|
|TAG_LONG8|| Unsigned 64-bit integer (valid only for BigTIFF formats).|
|TAG_SLONG8|| Signed 64-bit integer (valid only for BigTIFF formats).|
|TAG_IFD8|| 64-bit IFD offset (valid only for BigTIFF formats).|
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.
Pointer to a buffer containing the data to be saved using the tag.
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
This function copies the data from your buffer to an internally-allocated buffer. You should free your own buffer after calling this function. Any TIFF file that you save will include the tagged data until you clear the tag. LEADTOOLS keeps a list of tags in memory. The list contains all the tags set directly (by calling LFileSettings::SetTag) or indirectly (by calling LAnnContainer::SaveTag). All these tags will be saved unless you clear them. The way to clear a tag and remove it from the list is by calling LFileSettings::SetTag(uTag, 0, 0, NULL). LFileSettings::SetTag(0,0,0,NULL) will remove ALL the tags from the tag list.
For general information about TIFF tags, refer to Implementing TIFF Comments and Tags.
For an example, refer to LFileSettings::GetTag.
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries