jpeg_add_quant_table

Name

jpeg_add_quant_table -- add a quantization table

Synopsis

#include <jpeglib.h>

void jpeg_add_quant_table(j_compress_ptr cinfo, int table_slot, const unsigned int * basic_table, int scale_factor, boolean force_baseline);

Description

The function jpeg_add_quant_table() shall add a quantization table parameter at the "table_slot" index of the quantization table array. "basic_table" points to an array of 64 unsigned ints given in normal array order. These values are multiplied by "scale_factor"/100. The values are limited to the range 1..65535. If "force_baseline" is TRUE, the computed quantization table entries are limited to 1..255 for JPEG baseline compatibility.

Errors

jpeg_add_quant_table() shall return error and exit if "table_slot" is >= NUM_QUANT_TBLS. jpeg_add_quant_table() shall return error and exit if the state of the compression object indicates that the compression cycle has started.