ImageGear v26.3 - Updated
ImageGear.Core Assembly / ImageGear.Formats Namespace / ImGearFileFormats Class / GetPageCount Method / GetPageCount(Stream,ImGearFormats,ImGearLoadOptions) Method
The data stream containing an image.
Format ID: if ImGearFormats.UNKNOWN is specified, image format is auto-detected.
The loading options.




In This Topic
    GetPageCount(Stream,ImGearFormats,ImGearLoadOptions) Method
    In This Topic
    Calculates the number of pages in an image.
    Syntax
    'Declaration
     
    Public Overloads Shared Function GetPageCount( _
       ByVal stream As Stream, _
       ByVal formatId As ImGearFormats, _
       ByVal options As ImGearLoadOptions _
    ) As Integer
    'Usage
     
    Dim stream As Stream
    Dim formatId As ImGearFormats
    Dim options As ImGearLoadOptions
    Dim value As Integer
     
    value = ImGearFileFormats.GetPageCount(stream, formatId, options)
    public static int GetPageCount( 
       Stream stream,
       ImGearFormats formatId,
       ImGearLoadOptions options
    )
    public: static int GetPageCount( 
       Stream* stream,
       ImGearFormats formatId,
       ImGearLoadOptions* options
    ) 
    public:
    static int GetPageCount( 
       Stream^ stream,
       ImGearFormats formatId,
       ImGearLoadOptions^ options
    ) 

    Parameters

    stream
    The data stream containing an image.
    formatId
    Format ID: if ImGearFormats.UNKNOWN is specified, image format is auto-detected.
    options
    The loading options.

    Return Value

    Number of pages in the image.
    Remarks
    If format ID is not ImGearFormats.UNKNOWN and image format cannot be detected, an exception is thrown.
    See Also