AForge.Imaging.Formats.PNMCodec.Open C# (CSharp) Method

Open() public method

Open specified stream.
Not a PNM image format. Format of the PNM image is not supported. The stream contains invalid (broken) PNM image.
public Open ( Stream stream ) : int
stream Stream Stream to open.
return int
        public int Open( Stream stream )
        {
            // close previous decoding
            Close( );

            this.imageInfo    = ReadHeader( stream );
            this.stream       = stream;
            this.dataPosition = stream.Seek( 0, SeekOrigin.Current );

            return imageInfo.TotalFrames;
        }