←Select platform

GetInformationAsync(ILeadStream,Boolean,Int32) Method

Summary

Gets the image information from a disk file asynchronously.

Syntax

C#
VB
WinRT C#
C++
public IAsyncOperation<CodecsImageInfo> GetInformationAsync(  
   ILeadStream stream, 
   bool totalPages, 
   int pageNumber 
) 
Public Overloads Function GetInformationAsync( _ 
   ByVal stream As ILeadStream, _ 
   ByVal totalPages As Boolean, _ 
   ByVal pageNumber As Integer _ 
) As IAsyncOperation(Of CodecsImageInfo) 
public IAsyncOperation<CodecsImageInfo> GetInformationAsync(  
   ILeadStream stream, 
   bool totalPages, 
   int pageNumber 
) 
 function Leadtools.Codecs.RasterCodecs.GetInformationAsync(ILeadStream,Boolean,Int32)(  
   stream , 
   totalPages , 
   pageNumber  
) 
public: 
IAsyncOperation<CodecsImageInfo^>^ GetInformationAsync(  
   ILeadStream^ stream, 
   bool totalPages, 
   int pageNumber 
)  

Parameters

stream
ILeadStream containing the input file to query.

totalPages
true to query the file for total number of pages; false, otherwise.

pageNumber
The page number to query. Pass 1 for the first page (default).

Return Value

When this method completes, it returns the file information as a CodecsImageInfo.

Remarks

Specifying true for totalPages can cause the process to be slow if the file has a large number of pages.

The RasterCodecs class supports getting information on image files asynchronously using the GetInformationAsync methods. When calling any of these methods, the caller thread will not be blocked and the method will return instantly with an instance CodecsImageInfo that is in a loading status (CodecsImageInfo.IsLoading set to true). Do not use the other properties of this object while the object is in loading status.

When the RasterCodecs object finishes getting the information about the file, the various properties of the CodecsImageInfo will be populated with the image file information and the CodecsImageInfo.IsLoading property will be set to false.

It is best that you do not poll the CodecsImageInfo.IsLoading property to determine whether the image information has been collected. Instead, subscribe to the IAsyncOperation.Completed event to get notification on when the GetInformationAsync operation is completed and whether any errors occurred.

When this method completes, it returns the file information as a CodecsImageInfo.

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Codecs Assembly