Decode first frame of image from the specified stream.

Namespace:  AForge.Imaging.Formats
Assembly:  AForge.Imaging.Formats (in AForge.Imaging.Formats.dll) Version: 2.2.4.0 (2.2.4.0)

Syntax

C#
Bitmap DecodeSingleFrame(
	Stream stream
)

Parameters

stream
Type: System.IO..::.Stream
Source stream, which contains encoded image.

Return Value

Returns decoded image frame.

Remarks

For one-frame image formats the method is supposed to decode single available frame. For multi-frame image formats the first frame should be decoded.

Implementations of this method may throw FormatException exception to report about unrecognized image format, ArgumentException exception to report about incorrectly formatted image or NotSupportedException exception to report if certain formats are not supported.

See Also