CSJ2K.j2k.image.output.ImgWriterPGM.close C# (CSharp) Method

close() public method

Closes the underlying file or netwrok connection to where the data is written. Any call to other methods of the class become illegal after a call to this one.
If an I/O error occurs. /// ///
public close ( ) : void
return void
        public override void close()
        {
            int i;
            // Finish writing the file, writing 0s at the end if the data at end
            // has not been written.
            if (out_Renamed.Length != w * h + offset)
            {
                // Goto end of file
                out_Renamed.Seek(out_Renamed.Length, System.IO.SeekOrigin.Begin);
                // Fill with 0s
                for (i = offset + w * h - (int) out_Renamed.Length; i > 0; i--)
                {
                    out_Renamed.WriteByte((System.Byte) 0);
                }
            }
            out_Renamed.Dispose();
            src = null;
            out_Renamed = null;
            db = null;
        }