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

Marker writing
Mostra file Open project: prepare/HTML-Renderer Class Usage Examples

Public Methods

Method Description
jpeg_marker_writer ( jpeg_compress_struct cinfo )
write_file_header ( ) : void

Write datastream header. This consists of an SOI and optional APPn markers. We recommend use of the JFIF marker, but not the Adobe marker, when using YCbCr or grayscale data. The JFIF marker is also used for other standard JPEG colorspaces. The Adobe marker is helpful to distinguish RGB, CMYK, and YCCK colorspaces. Note that an application can write additional header markers after jpeg_start_compress returns.

write_file_trailer ( ) : void

Write datastream trailer.

write_frame_header ( ) : void

Write frame header. This consists of DQT and SOFn markers, a conditional LSE marker and a conditional pseudo SOS marker. Note that we do not emit the SOF until we have emitted the DQT(s). This avoids compatibility problems with incorrect implementations that try to error-check the quant table numbers as soon as they see the SOF.

write_marker_byte ( byte val ) : void

Emit one byte of marker parameters following write_marker_header

write_marker_header ( int marker, int datalen ) : void

Emit an arbitrary marker header

write_scan_header ( ) : void

Write scan header. This consists of DHT or DAC markers, optional DRI, and SOS. Compressed data will be written following the SOS.

write_tables_only ( ) : void

Write an abbreviated table-specification datastream. This consists of SOI, DQT and DHT tables, and EOI. Any table that is defined and not marked sent_table = true will be emitted. Note that all tables will be marked sent_table = true at exit.

Private Methods

Method Description
emit_2bytes ( int value ) : void

Emit a 2-byte integer; these are always MSB first in JPEG files

emit_adobe_app14 ( ) : void

Emit an Adobe APP14 marker

emit_byte ( int val ) : void

Emit a byte

emit_dac ( ) : void
emit_dht ( int index, bool is_ac ) : void

Emit a DHT marker

emit_dqt ( int index ) : int

Emit a DQT marker

emit_dri ( ) : void

Emit a DRI marker

emit_jfif_app0 ( ) : void

Emit a JFIF-compliant APP0 marker

emit_lse_ict ( ) : void

Emit an LSE inverse color transform specification marker

emit_marker ( JPEG_MARKER mark ) : void

Emit a marker code

emit_pseudo_sos ( ) : void

Emit a pseudo SOS marker

emit_sof ( JPEG_MARKER code ) : void

Emit a SOF marker

emit_sos ( ) : void

Emit a SOS marker

Method Details

jpeg_marker_writer() public method

public jpeg_marker_writer ( jpeg_compress_struct cinfo )
cinfo jpeg_compress_struct

write_file_header() public method

Write datastream header. This consists of an SOI and optional APPn markers. We recommend use of the JFIF marker, but not the Adobe marker, when using YCbCr or grayscale data. The JFIF marker is also used for other standard JPEG colorspaces. The Adobe marker is helpful to distinguish RGB, CMYK, and YCCK colorspaces. Note that an application can write additional header markers after jpeg_start_compress returns.
public write_file_header ( ) : void
return void

write_file_trailer() public method

Write datastream trailer.
public write_file_trailer ( ) : void
return void

write_frame_header() public method

Write frame header. This consists of DQT and SOFn markers, a conditional LSE marker and a conditional pseudo SOS marker. Note that we do not emit the SOF until we have emitted the DQT(s). This avoids compatibility problems with incorrect implementations that try to error-check the quant table numbers as soon as they see the SOF.
public write_frame_header ( ) : void
return void

write_marker_byte() public method

Emit one byte of marker parameters following write_marker_header
public write_marker_byte ( byte val ) : void
val byte
return void

write_marker_header() public method

Emit an arbitrary marker header
public write_marker_header ( int marker, int datalen ) : void
marker int
datalen int
return void

write_scan_header() public method

Write scan header. This consists of DHT or DAC markers, optional DRI, and SOS. Compressed data will be written following the SOS.
public write_scan_header ( ) : void
return void

write_tables_only() public method

Write an abbreviated table-specification datastream. This consists of SOI, DQT and DHT tables, and EOI. Any table that is defined and not marked sent_table = true will be emitted. Note that all tables will be marked sent_table = true at exit.
public write_tables_only ( ) : void
return void