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

Downsampling
Afficher le fichier Open project: prepare/HTML-Renderer Class Usage Examples

Méthodes publiques

Méthode Description
NeedContextRows ( ) : bool
downsample ( byte input_buf, int in_row_index, byte output_buf, int out_row_group_index ) : void

Do downsampling for a whole row group (all components). In this version we simply downsample each component independently.

jpeg_downsampler ( jpeg_compress_struct cinfo )

Private Methods

Méthode Description
expand_right_edge ( byte image_data, int startInputRow, int num_rows, int input_cols, int output_cols ) : void

Expand a component horizontally from width input_cols to width output_cols, by duplicating the rightmost samples.

fullsize_downsample ( int componentIndex, byte input_data, int startInputRow, byte output_data, int startOutRow ) : void

Downsample pixel values of a single component. This version handles the special case of a full-size component, without smoothing.

fullsize_smooth_downsample ( int componentIndex, byte input_data, int startInputRow, byte output_data, int startOutRow ) : void

Downsample pixel values of a single component. This version handles the special case of a full-size component, with smoothing. One row of context is required.

h2v1_downsample ( int componentIndex, byte input_data, int startInputRow, byte output_data, int startOutRow ) : void

Downsample pixel values of a single component. This version handles the common case of 2:1 horizontal and 1:1 vertical, without smoothing. A note about the "bias" calculations: when rounding fractional values to integer, we do not want to always round 0.5 up to the next integer. If we did that, we'd introduce a noticeable bias towards larger values. Instead, this code is arranged so that 0.5 will be rounded up or down at alternate pixel locations (a simple ordered dither pattern).

h2v2_downsample ( int componentIndex, byte input_data, int startInputRow, byte output_data, int startOutRow ) : void

Downsample pixel values of a single component. This version handles the standard case of 2:1 horizontal and 2:1 vertical, without smoothing.

h2v2_smooth_downsample ( int componentIndex, byte input_data, int startInputRow, byte output_data, int startOutRow ) : void

Downsample pixel values of a single component. This version handles the standard case of 2:1 horizontal and 2:1 vertical, with smoothing. One row of context is required.

int_downsample ( int componentIndex, byte input_data, int startInputRow, byte output_data, int startOutRow ) : void

Downsample pixel values of a single component. One row group is processed per call. This version handles arbitrary integral sampling ratios, without smoothing. Note that this version is not actually used for customary sampling ratios.

Method Details

NeedContextRows() public méthode

public NeedContextRows ( ) : bool
Résultat bool

downsample() public méthode

Do downsampling for a whole row group (all components). In this version we simply downsample each component independently.
public downsample ( byte input_buf, int in_row_index, byte output_buf, int out_row_group_index ) : void
input_buf byte
in_row_index int
output_buf byte
out_row_group_index int
Résultat void

jpeg_downsampler() public méthode

public jpeg_downsampler ( jpeg_compress_struct cinfo )
cinfo jpeg_compress_struct