BitMiracle.LibJpeg.Classic.Internal.my_destination_mgr.term_destination C# (CSharp) Method

term_destination() public method

Terminate destination --- called by jpeg_finish_compress after all data has been written. Usually needs to flush buffer. NB: *not* called by jpeg_abort or jpeg_destroy; surrounding application must deal with any cleanup that should happen even for error exit.
public term_destination ( ) : void
return void
        public override void term_destination()
        {
            int datacount = m_buffer.Length - freeInBuffer;

            /* Write any data remaining in the buffer */
            if (datacount > 0)
                writeBuffer(datacount);

            m_outfile.Flush();
        }