C# Class BitMiracle.LibJpeg.Classic.Internal.my_destination_mgr

Expanded data destination object for output to Stream
Inheritance: jpeg_destination_mgr
Show file Open project: prepare/HTML-Renderer

Public Methods

Method Description
empty_output_buffer ( ) : bool

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.

init_destination ( ) : void

Initialize destination --- called by jpeg_start_compress before any data is actually written.

my_destination_mgr ( jpeg_compress_struct cinfo, Stream alreadyOpenFile ) : System
term_destination ( ) : void

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.

Private Methods

Method Description
writeBuffer ( int dataCount ) : void

Method Details

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

init_destination() public method

Initialize destination --- called by jpeg_start_compress before any data is actually written.
public init_destination ( ) : void
return void

my_destination_mgr() public method

public my_destination_mgr ( jpeg_compress_struct cinfo, Stream alreadyOpenFile ) : System
cinfo jpeg_compress_struct
alreadyOpenFile Stream
return System

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