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



fileName
A System.String containing the input file name.
fileName
A System.String containing the input file name.
Reads all the metadata markers (COM and APPn) from a file.

Syntax

Visual Basic (Declaration) 
Overloads Public Function ReadMarkers( _
   ByVal fileName As String _
) As RasterCollection(Of RasterMarkerMetadata)
Visual Basic (Usage)Copy Code
Dim instance As RasterCodecs
Dim fileName As String
Dim value As RasterCollection(Of RasterMarkerMetadata)
 
value = instance.ReadMarkers(fileName)
C++/CLI 
public:
RasterCollection<RasterMarkerMetadata^>^ ReadMarkers( 
   String^ fileName
) 

Parameters

fileName
A System.String containing the input file name.

Return Value

A collection of Leadtools.RasterMarkerMetadata objects containing the metadata marker data.

Example

This example will read all the markers from an EXIF file

Visual BasicCopy Code
Private Sub ReadMarkersFromFileExample(ByVal exifFileName As String)
   Dim codecs As RasterCodecs = New RasterCodecs()
   Dim markers As RasterCollection(Of RasterMarkerMetadata) = codecs.ReadMarkers(exifFileName)
   Console.WriteLine("{0} markers found with the following ID's:", markers.Count)
   For Each marker As RasterMarkerMetadata In markers
      Console.WriteLine(marker.Id)
   Next marker

   codecs.Dispose()
End Sub
C#Copy Code
void ReadMarkersFromFileExample(string exifFileName)
{
   RasterCodecs codecs = new RasterCodecs();
   RasterCollection<RasterMarkerMetadata> markers = codecs.ReadMarkers(exifFileName);
   Console.WriteLine("{0} markers found with the following ID's:", markers.Count);
   foreach(RasterMarkerMetadata marker in markers)
      Console.WriteLine(marker.Id);

   codecs.Dispose();
}
SilverlightCSharpCopy Code
SilverlightVBCopy Code

Remarks

This method reads all the metadata markers from a file, and returns a collection of the markers.

For Exif files, this metadata collection will contain all the Exif and GPS comments, stored in APP1. It will also contain the audio information stored in APP2.

If the file contains no marker, then this method will return an empty collection.

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