Implementing TIFF Tags

Only TIFF files support tags. The TIFF 6.0 Specification sets aside a range of private tags that developers can define. The TIFF specification reserved tags 1 to 32767 for general use (restricted tags) and recommends that tags 32768 to 65535 should be used for application use (user-defined tags). To avoid conflicts with files created by other developers, you can register your tag by contacting Adobe Developer Relations. (The E-Mail address posted on The Unofficial TIFF Home Page is gapdevsup@adobe.com.)

To define and set a tag, use the SetTag method.

To read tag data from a file, use the ReadTag method.

To read the tag data from file that is stored in memory, use ReadTagMemory method.

To get information about a tag, use the following:

GetTagData method

GetTagType method

GetTagCount method

To write tag(s) to a file, use the WriteTag method.

To read a comment from a file at a specified location, use the ReadFileCommentOffset method.

You can enumerate tags using the EnumFileTags method. The EnumFileTags method enumerates all tags in a TIFF or Exif file. For each tag enumerated, the EnumTags event is called. Through this event, you can obtain information about, or otherwise process, each tag that is enumerated. Pass FALSE to the StopFireEnumTags property to continue firing the EnumTags event, and pass TRUE to stop firing the EnumTags event.

You can delete a specified tag from the file using the DeleteTag method.