Loads a FreeImage bitmap. In case the loading format is FIF_UNKNOWN the bitmaps real format is being analysed. The stream must be set to the correct position before calling LoadFromStream.

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

Syntax

C#
public static FIBITMAP LoadFromStream(
	Stream stream,
	ref FREE_IMAGE_FORMAT format
)
Visual Basic (Declaration)
Public Shared Function LoadFromStream ( _
	stream As Stream, _
	ByRef format As FREE_IMAGE_FORMAT _
) As FIBITMAP
Visual C++
public:
static FIBITMAP LoadFromStream(
	Stream^ stream, 
	FREE_IMAGE_FORMAT% format
)

Parameters

stream
Type: System.IO..::.Stream
The stream to read from.
format
Type: FreeImageAPI..::.FREE_IMAGE_FORMAT %
Format of the image. If the format is unknown use FIF_UNKNOWN. In case a suitable format was found by LoadFromStream it will be returned in format.

Return Value

Handle to a FreeImage bitmap.

Exceptions

ExceptionCondition
System..::.ArgumentNullException stream is null.
System..::.ArgumentException stream is not capable of reading.

Version Information

FreeImage.NET

Supported in: 3.11.0, 3.12.0, 3.13.0, 3.13.1

See Also