ImageGear v26.3 - Updated
ImageGear.Core Assembly / ImageGear.Formats Namespace / ImGearFileFormats Class / Detect(Stream) Method
The data stream containing an image.




In This Topic
    Detect(Stream) Method
    In This Topic
    Detects the format of an image.
    Syntax
    'Declaration
     
    Public Shared Function Detect( _
       ByVal stream As Stream _
    ) As IImGearFormat
    'Usage
     
    Dim stream As Stream
    Dim value As IImGearFormat
     
    value = ImGearFileFormats.Detect(stream)
    public static IImGearFormat Detect( 
       Stream stream
    )
    public: static IImGearFormat* Detect( 
       Stream* stream
    ) 
    public:
    static IImGearFormat^ Detect( 
       Stream^ stream
    ) 

    Parameters

    stream
    The data stream containing an image.

    Return Value

    The format from the list of formats.
    Remarks
    If an image cannot be detected, an exception is thrown.
    If data in stream are Microsoft Office 2007 password protected format an exception is thrown like format is not detected because it impossible to detect this format. The information about specific format is password protected too.
    See Also