←Select platform

ReadMarkers(Stream) Method

Summary
Reads all the metadata markers (COM and APPn) from a stream.
Syntax
C#
VB
Objective-C
C++
Java
public IList<RasterMarkerMetadata> ReadMarkers( 
   Stream stream 
) 
Public Overloads Function ReadMarkers( _ 
   ByVal stream As Stream _ 
) As IList(Of RasterMarkerMetadata) 
- (nullable NSArray<LTRasterMarkerMetadata *> *)readMarkersFromStream:(LTLeadStream *)stream error:(NSError **)error 
public List<RasterMarkerMetadata> readMarkers(ILeadStream stream) 
public: 
IList<RasterMarkerMetadata^>^ ReadMarkers(  
   Stream^ stream 
)  

Parameters

stream
A Stream containing the input file image data.

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 a stream that contains an EXIF file data

C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing; 
using Leadtools.ImageProcessing.Color; 
using Leadtools.Svg; 
 
 
void ReadMarkersFromStreamExample(Stream theStream) 
{ 
	RasterCodecs codecs = new RasterCodecs(); 
 
	IList<RasterMarkerMetadata> markers = codecs.ReadMarkers(theStream); 
	Console.WriteLine("{0} markers found with the following ID's:", markers.Count); 
	foreach (RasterMarkerMetadata marker in markers) 
		Console.WriteLine(marker.Id); 
 
	codecs.Dispose(); 
} 
Requirements

Target Platforms

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

Leadtools.Codecs Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.