Image decoder to decode different custom image file formats.
Namespace:
AForge.Imaging.FormatsAssembly: AForge.Imaging.Formats (in AForge.Imaging.Formats.dll) Version: 2.2.4.0 (2.2.4.0)
Syntax
| C# |
|---|
public class ImageDecoder |
Remarks
The class represent a help class, which simplifies decoding of image files finding appropriate image decoder automatically (using list of registered image decoders). Instead of using required image decoder directly, users may use this class, which will find required decoder by file's extension.
By default the class registers on its own all decoders, which are available in AForge.Imaging.Formats library. If user has implementation of his own image decoders, he needs to register them using RegisterDecoder(String, IImageDecoder) method to be able to use them through the ImageDecoder class.
Sample usage:
// sample file name string fileName = "myFile.pnm"; // decode image file Bitmap = ImageDecoder.DecodeFromFile( fileName );