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

Colorspace conversion
显示文件 Open project: prepare/HTML-Renderer

Public Methods

Method Description
color_convert ( ComponentBuffer input_buf, int perComponentOffsets, int input_row, byte output_buf, int output_row, int num_rows ) : void

Convert some rows of samples to the output colorspace. Note that we change from noninterleaved, one-plane-per-component format to interleaved-pixel format. The output buffer is therefore three times as wide as the input buffer. A starting row offset is provided only for the input buffer. The caller can easily adjust the passed output_buf value to accommodate any row offset required on that side.

jpeg_color_deconverter ( jpeg_decompress_struct cinfo )

Module initialization routine for output colorspace conversion.

Private Methods

Method Description
FIX ( double x ) : int
build_bg_ycc_rgb_table ( ) : void

Initialize tables for BG_YCC->RGB colorspace conversion.

build_rgb_y_table ( ) : void
build_ycc_rgb_table ( ) : void

Initialize tables for YCbCr->RGB colorspace conversion.

cmyk_rgb_convert ( ComponentBuffer input_buf, int input_row, byte output_buf, int output_row, int num_rows ) : void

Color conversion for CMYK -> RGB

gray_rgb_convert ( ComponentBuffer input_buf, int input_row, byte output_buf, int output_row, int num_rows ) : void

Convert grayscale to RGB: just duplicate the graylevel three times. This is provided to support applications that don't want to cope with grayscale as a separate case.

grayscale_convert ( ComponentBuffer input_buf, int input_row, byte output_buf, int output_row, int num_rows ) : void

Color conversion for grayscale: just copy the data. This also works for YCC -> grayscale conversion, in which we just copy the Y (luminance) component and ignore chrominance.

null_convert ( ComponentBuffer input_buf, int input_row, byte output_buf, int output_row, int num_rows ) : void

Color conversion for no colorspace change: just copy the data, converting from separate-planes to interleaved representation.

rgb1_gray_convert ( ComponentBuffer input_buf, int input_row, byte output_buf, int output_row, int num_rows ) : void
rgb1_rgb_convert ( ComponentBuffer input_buf, int input_row, byte output_buf, int output_row, int num_rows ) : void
rgb_convert ( ComponentBuffer input_buf, int input_row, byte output_buf, int output_row, int num_rows ) : void
rgb_gray_convert ( ComponentBuffer input_buf, int input_row, byte output_buf, int output_row, int num_rows ) : void
ycc_rgb_convert ( ComponentBuffer input_buf, int input_row, byte output_buf, int output_row, int num_rows ) : void
ycck_cmyk_convert ( ComponentBuffer input_buf, int input_row, byte output_buf, int output_row, int num_rows ) : void

Adobe-style YCCK->CMYK conversion. We convert YCbCr to R=1-C, G=1-M, and B=1-Y using the same conversion as above, while passing K (black) unchanged. We assume build_ycc_rgb_table has been called.

ycck_rgb_convert ( ComponentBuffer input_buf, int input_row, byte output_buf, int output_row, int num_rows ) : void

Color conversion for YCCK -> RGB it's just a gybrid of YCCK -> CMYK and CMYK -> RGB conversions

Method Details

color_convert() public method

Convert some rows of samples to the output colorspace. Note that we change from noninterleaved, one-plane-per-component format to interleaved-pixel format. The output buffer is therefore three times as wide as the input buffer. A starting row offset is provided only for the input buffer. The caller can easily adjust the passed output_buf value to accommodate any row offset required on that side.
public color_convert ( ComponentBuffer input_buf, int perComponentOffsets, int input_row, byte output_buf, int output_row, int num_rows ) : void
input_buf ComponentBuffer
perComponentOffsets int
input_row int
output_buf byte
output_row int
num_rows int
return void

jpeg_color_deconverter() public method

Module initialization routine for output colorspace conversion.
public jpeg_color_deconverter ( jpeg_decompress_struct cinfo )
cinfo jpeg_decompress_struct