Click or drag to resize
Accord.NET (logo)

IImageDecoderDecodeSingleFrame Method

Decode first frame of image from the specified stream.

Namespace:  Accord.Imaging.Formats
Assembly:  Accord.Imaging (in Accord.Imaging.dll) Version: 3.7.0
Syntax
Bitmap DecodeSingleFrame(
	Stream stream
)
Request Example View Source

Parameters

stream
Type: System.IOStream
Source stream, which contains encoded image.

Return Value

Type: Bitmap
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