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

empty_output_buffer() public method

Empty the output buffer --- called whenever buffer fills up. In typical applications, this should write the entire output buffer (ignoring the current state of next_output_byte and free_in_buffer), reset the pointer and count to the start of the buffer, and return true indicating that the buffer has been dumped. In applications that need to be able to suspend compression due to output overrun, a false return indicates that the buffer cannot be emptied now. In this situation, the compressor will return to its caller (possibly with an indication that it has not accepted all the supplied scanlines). The application should resume compression after it has made more room in the output buffer. Note that there are substantial restrictions on the use of suspension --- see the documentation. When suspending, the compressor will back up to a convenient restart point (typically the start of the current MCU). next_output_byte and free_in_buffer indicate where the restart point will be if the current call returns false. Data beyond this point will be regenerated after resumption, so do not write it out when emptying the buffer externally.
public empty_output_buffer ( ) : bool
return bool
        public override bool empty_output_buffer()
        {
            writeBuffer(m_buffer.Length);
            initInternalBuffer(m_buffer, 0);
            return true;
        }