LEADTOOLS Image File Support (Leadtools.Codecs assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
ReadTag(Stream,Int32,Int32) Method
See Also 
Leadtools.Codecs Namespace > RasterCodecs Class > ReadTag Method : ReadTag(Stream,Int32,Int32) Method



stream
A System.IO.Stream containing the input file image data.
pageNumber
1-based index of the page from which to read the tag.
id

Tag to identify the data in the TIFF file. Use the same tag that you specified in the WriteTag(String,Int32,RasterTagMetadata). Examples of registered tags are:

Value Meaning
0x8298 Copyright comment
0x8769 General Exif comments
0x8825 Exif GPS comments
0x80A4 Annotation TIFF tag

stream
A System.IO.Stream containing the input file image data.
pageNumber
1-based index of the page from which to read the tag.
id

Tag to identify the data in the TIFF file. Use the same tag that you specified in the WriteTag(String,Int32,RasterTagMetadata). Examples of registered tags are:

Value Meaning
0x8298 Copyright comment
0x8769 General Exif comments
0x8825 Exif GPS comments
0x80A4 Annotation TIFF tag

Gets the specified tagged data from a TIFF stream.

Syntax

Visual Basic (Declaration) 
Overloads Public Function ReadTag( _
   ByVal stream As Stream, _
   ByVal pageNumber As Integer, _
   ByVal id As Integer _
) As RasterTagMetadata
Visual Basic (Usage)Copy Code
Dim instance As RasterCodecs
Dim stream As Stream
Dim pageNumber As Integer
Dim id As Integer
Dim value As RasterTagMetadata
 
value = instance.ReadTag(stream, pageNumber, id)
C# 
public RasterTagMetadata ReadTag( 
   Stream stream,
   int pageNumber,
   int id
)
C++/CLI 
public:
RasterTagMetadata^ ReadTag( 
   Stream^ stream,
   int pageNumber,
   int id
) 

Parameters

stream
A System.IO.Stream containing the input file image data.
pageNumber
1-based index of the page from which to read the tag.
id

Tag to identify the data in the TIFF file. Use the same tag that you specified in the WriteTag(String,Int32,RasterTagMetadata). Examples of registered tags are:

Value Meaning
0x8298 Copyright comment
0x8769 General Exif comments
0x8825 Exif GPS comments
0x80A4 Annotation TIFF tag

Return Value

The tag data.

Example

For an example, refer to DeleteTag.

Remarks

This method is provided to support TIFF tags that you define. If no such tag exists in the image, this method will return a null reference (Nothing in Visual Basic).

To read all the tags stored in a file, use RasterCodecs.ReadTags

You can use RasterCodecs.TagsSupported to check if a certain file format supports tags.

Requirements

Target Platforms: Silverlight, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)

See Also