Leadtools.Codecs Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
ReadComment(Stream,Int32,RasterCommentMetadataType) Method
See Also 
Leadtools.Codecs Namespace > RasterCodecs Class > ReadComment Method : ReadComment(Stream,Int32,RasterCommentMetadataType) Method



stream
A Stream containing the input file data.
pageNumber
1-based index of the page from which to read the comment.
type
The type of comment. Refer to Types of File Comments.
Gets a comment field from a stream.

Syntax

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

Parameters

stream
A Stream containing the input file data.
pageNumber
1-based index of the page from which to read the comment.
type
The type of comment. Refer to Types of File Comments.

Return Value

A RasterCommentMetadata object containing the comment field information. If no such comment is found in the file, this method will return a null reference (Nothing in Visual Basic).

Example

For an example, refer to ReadComment.

Remarks

Some file formats can contain comments, and some cannot, and each file format has its own set of comment types. When you save a file, the comments in the RasterImage object can be saved in the file. The index into the array (specified using a constant) determines the type of comment.

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

To read all the comments stored in a file, use RasterCodecs.ReadComments(String,Int32).

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also