Decode first frame for the specified file.

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

Syntax

C#
public static Bitmap DecodeFromFile(
	string fileName,
	out ImageInfo imageInfo
)

Parameters

fileName
Type: System..::.String
File name to read image from.
imageInfo
Type: AForge.Imaging.Formats..::.ImageInfo %
Information about the decoded image.

Return Value

Return decoded image. In the case if file format support multiple frames, the method return the first frame.

Remarks

The method uses table of registered image decoders to find the one, which should be used for the specified file. If there is not appropriate decoder found, the method uses default .NET's image decoding routine (see FromFile(String)).

See Also