Visual Basic (Declaration) | |
---|---|
Public Overloads Sub EnumTags( _ ByVal fileName As String, _ ByVal pageNumber As Integer _ ) |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public void EnumTags( string fileName, int pageNumber ) |
C++/CLI | |
---|---|
public: void EnumTags( String^ fileName, int pageNumber ) |
Parameters
- fileName
- A String containing the input file name.
- pageNumber
- 1-based index of the page from which to enumerate the tags.
This example will show all the tags in the give file, read them then saves them to another file
Visual Basic | Copy Code |
---|---|
Private tagsFileName As String |
C# | Copy Code |
---|---|
string tagsFileName; |
This method will fire the TagFound event for each tag found in the file.
Currently, only TIFF and Exif files contain tags.
For multipage TIFF files, you can enumerate the tags from a particular page. Specify the page number whose tags to enumerate.
This method enumerates the standard TIFF tags and the user tags. Standard TIFF tags are less than 32767. User TIFF tags are usually between 32768 and 65535.
To enumerate the tags stored in a stream, use EnumTags.
To read a tag value, use ReadTag and to read all the tags in a file, use RasterCodecs.ReadTags(String,Int32).
For general information about TIFF tags, refer to Implementing TIFF Comments and Tags.
Do not attempt to use DeleteTag to delete tags from inside the TagFound event. If you want to delete tags that you enumerate, use this event to add the tags to a list. Upon returning from EnumTags, you can delete all the tags from the list.
You can use RasterCodecs.TagsSupported to check if a certain file format supports tags.
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family