PNM image format decoder.

The PNM (an acronym derived from "Portable Any Map") format is an abstraction of the PBM, PGM and PPM formats. I.e. the name "PNM" refers collectively to PBM (binary images), PGM (grayscale images) and PPM (color image) image formats.

Image in PNM format can be found in different scientific databases and laboratories, for example Yale Face Database and AT&T Face Database.

Only PNM images of P5 (binary encoded PGM) and P6 (binary encoded PPM) formats are supported at this point.

The maximum supported pixel value is 255 at this point.

The class supports only one-frame PNM images. As it is specified in format specification, the multi-frame PNM images has appeared starting from 2000.

Inheritance: IImageDecoder
Beispiel #1
0
        static ImageDecoder()
        {
            decoders = new Dictionary <string, IImageDecoder>();
            IImageDecoder decoder = new PNMCodec();

            RegisterDecoder("pbm", decoder);
            RegisterDecoder("pgm", decoder);
            RegisterDecoder("pnm", decoder);
            RegisterDecoder("ppm", decoder);
            decoder = new FITSCodec();
            RegisterDecoder("fit", decoder);
            RegisterDecoder("fits", decoder);
        }
Beispiel #2
0
        static ImageDecoder( )
        {
            // register PNM file format
            IImageDecoder decoder = new PNMCodec( );

            RegisterDecoder("pbm", decoder);
            RegisterDecoder("pgm", decoder);
            RegisterDecoder("pnm", decoder);
            RegisterDecoder("ppm", decoder);

            // register FITS file format
            decoder = new FITSCodec( );

            RegisterDecoder("fit", decoder);
            RegisterDecoder("fits", decoder);
        }
Beispiel #3
0
        static ImageDecoder( )
        {
            // register PNM file format
            IImageDecoder decoder = new PNMCodec( );

            RegisterDecoder( "pbm", decoder );
            RegisterDecoder( "pgm", decoder );
            RegisterDecoder( "pnm", decoder );
            RegisterDecoder( "ppm", decoder );

            // register FITS file format
            decoder = new FITSCodec( );

            RegisterDecoder( "fit",  decoder );
            RegisterDecoder( "fits", decoder );
        }