Orders FreeImage to analyze the bitmap signature. In case the stream is not seekable, the stream will have been used and must be recreated for loading.

Namespace:  FreeImageAPI
Assembly:  FreeImageNET (in FreeImageNET.dll)

Syntax

C#
public static FREE_IMAGE_FORMAT GetFileTypeFromStream(
	Stream stream
)
Visual Basic (Declaration)
Public Shared Function GetFileTypeFromStream ( _
	stream As Stream _
) As FREE_IMAGE_FORMAT
Visual C++
public:
static FREE_IMAGE_FORMAT GetFileTypeFromStream(
	Stream^ stream
)

Parameters

stream
Type: System.IO..::.Stream
Name of the stream to analyze.

Return Value

Type of the bitmap.

Exceptions

ExceptionCondition
System..::.ArgumentNullException stream is null.
System..::.ArgumentException stream can not read.

Version Information

FreeImage.NET

Supported in: 3.11.0, 3.12.0, 3.13.0, 3.13.1

See Also