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

Input control module
Mostra file Open project: prepare/HTML-Renderer Class Usage Examples

Public Methods

Method Description
EOIReached ( ) : bool
HasMultipleScans ( ) : bool
consume_input ( ) : ReadResult
finish_input_pass ( ) : void

Finish up after inputting a compressed-data scan. This is called by the coefficient controller after it's read all the expected data of the scan.

jpeg_core_output_dimensions ( ) : void
jpeg_input_controller ( jpeg_decompress_struct cinfo ) : System

Initialize the input controller module. This is called only once, when the decompression object is created.

reset_input_controller ( ) : void

Reset state to begin a fresh datastream.

start_input_pass ( ) : void

Initialize the input modules to read a scan of compressed data. The first call to this is done after initializing the entire decompressor (during jpeg_start_decompress). Subsequent calls come from consume_markers, below.

Private Methods

Method Description
consume_markers ( ) : ReadResult

Read JPEG markers before, between, or after compressed-data scans. Change state as necessary when a new scan is reached. Return value is JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. The consume_input method pointer points either here or to the coefficient controller's consume_data routine, depending on whether we are reading a compressed data segment or inter-segment markers. Note: This function should NOT return a pseudo SOS marker(with zero component number) to the caller.A pseudo marker received by read_markers is processed and then skipped for other markers.

initial_setup ( ) : void

Routines to calculate various quantities related to the size of the image. Called once, when first SOS marker is reached

latch_quant_tables ( ) : void

Save away a copy of the Q-table referenced by each component present in the current scan, unless already saved during a prior scan. In a multiple-scan JPEG file, the encoder could assign different components the same Q-table slot number, but change table definitions between scans so that each component uses a different Q-table. (The IJG encoder is not currently capable of doing this, but other encoders might.) Since we want to be able to dequantize all the components at the end of the file, this means that we have to save away the table actually used for each component. We do this by copying the table at the start of the first scan containing the component. The JPEG spec prohibits the encoder from changing the contents of a Q-table slot between scans of a component using that slot. If the encoder does so anyway, this decoder will simply use the Q-table values that were current at the start of the first scan for the component. The decompressor output side looks only at the saved quant tables, not at the current Q-table slots.

per_scan_setup ( ) : void

Do computations that are needed before processing a JPEG scan cinfo.comps_in_scan and cinfo.cur_comp_info[] were set from SOS marker

Method Details

EOIReached() public method

public EOIReached ( ) : bool
return bool

HasMultipleScans() public method

public HasMultipleScans ( ) : bool
return bool

consume_input() public method

public consume_input ( ) : ReadResult
return ReadResult

finish_input_pass() public method

Finish up after inputting a compressed-data scan. This is called by the coefficient controller after it's read all the expected data of the scan.
public finish_input_pass ( ) : void
return void

jpeg_core_output_dimensions() public method

public jpeg_core_output_dimensions ( ) : void
return void

jpeg_input_controller() public method

Initialize the input controller module. This is called only once, when the decompression object is created.
public jpeg_input_controller ( jpeg_decompress_struct cinfo ) : System
cinfo jpeg_decompress_struct
return System

reset_input_controller() public method

Reset state to begin a fresh datastream.
public reset_input_controller ( ) : void
return void

start_input_pass() public method

Initialize the input modules to read a scan of compressed data. The first call to this is done after initializing the entire decompressor (during jpeg_start_decompress). Subsequent calls come from consume_markers, below.
public start_input_pass ( ) : void
return void