Assembly: AForge.Imaging.Formats (in AForge.Imaging.Formats.dll) Version: 126.96.36.199 (188.8.131.52)
public class ImageDecoder
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 class.
// sample file name string fileName = "myFile.pnm"; // decode image file Bitmap = ImageDecoder.DecodeFromFile( fileName );