←Select platform

ReadMarkers(string) Method

Summary

Reads all the metadata markers (COM and APPn) from a file.

Syntax
C#
VB
Objective-C
C++
public IList<RasterMarkerMetadata> ReadMarkers( 
   string fileName 
) 
Public Overloads Function ReadMarkers( _ 
   ByVal fileName As String _ 
) As IList(Of RasterMarkerMetadata) 
- (nullable NSArray<LTRasterMarkerMetadata *> *)readMarkersFromFile:(NSString *)file error:(NSError **)error 
public: 
IList<RasterMarkerMetadata^>^ ReadMarkers(  
   String^ fileName 
)  

Parameters

fileName
A String containing the input file name.

Return Value

A collection of RasterMarkerMetadata objects containing the metadata marker data.

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.

Example

This example will read all the markers from an EXIF file

C#
VB
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing; 
using Leadtools.ImageProcessing.Color; 
using Leadtools.Svg; 
using LeadtoolsExamples.Common; 
 
void ReadMarkersFromFileExample(string exifFileName) 
{ 
   RasterCodecs codecs = new RasterCodecs(); 
 
   IList<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(); 
} 
Imports Leadtools 
Imports Leadtools.Codecs 
Imports Leadtools.ImageProcessing 
Imports Leadtools.ImageProcessing.Color 
Imports Leadtools.Drawing 
Imports Leadtools.Svg 
 
Private Sub ReadMarkersFromFileExample(ByVal exifFileName As String) 
   Dim codecs As RasterCodecs = New RasterCodecs() 
 
   Dim markers As IList(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 

Requirements

Target Platforms

Help Version 20.0.2019.3.11
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2019 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Codecs Assembly