Release Notes

Open Source Used In AsyncOS 8.8 for Cisco Web Security Appliances
63
recommended by IJG (cjpeg's "-quality" switch uses this routine).
Note that the exact mapping from quality values to tables may change
in future IJG releases as more is learned about DCT quantization.
If the force_baseline parameter is TRUE, then the quantization table
entries are constrained to the range 1..255 for full JPEG baseline
compatibility. In the current implementation, this only makes a
difference for quality settings below 25, and it effectively prevents
very small/low quality files from being generated. The IJG decoder
is capable of reading the non-baseline files generated at low quality
settings when force_baseline is FALSE, but other decoders may not be.
jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor,
 boolean force_baseline)
Same as jpeg_set_quality() except that the generated tables are the
sample tables given in the JPEC spec section K.1, multiplied by the
specified scale factor (which is expressed as a percentage; thus
scale_factor = 100 reproduces the spec's tables). Note that larger
scale factors give lower quality. This entry point is useful for
conforming to the Adobe PostScript DCT conventions, but we do not
recommend linear scaling as a user-visible quality scale otherwise.
force_baseline again constrains the computed table entries to 1..255.
int jpeg_quality_scaling (int quality)
Converts a value on the IJG-recommended quality scale to a linear
scaling percentage. Note that this routine may change or go away
in future releases --- IJG may choose to adopt a scaling method that
can't be expressed as a simple scalar multiplier, in which case the
premise of this routine collapses. Caveat user.
jpeg_default_qtables (j_compress_ptr cinfo, boolean force_baseline)
Set default quantization tables with linear q_scale_factor[] values
(see below).
jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl,
 const unsigned int *basic_table,
 int scale_factor, boolean force_baseline)
Allows an arbitrary quantization table to be created. which_tbl
indicates which table slot to fill. basic_table points to an array
of 64 unsigned ints given in normal array order. These values are
multiplied by scale_factor/100 and then clamped to the range 1..65535
(or to 1..255 if force_baseline is TRUE).
CAUTION: prior to library version 6a, jpeg_add_quant_table expected
the basic table to be given in JPEG zigzag order. If you need to
write code that works with either older or newer versions of this
routine, you must check the library version number. Something like
"#if JPEG_LIB_VERSION >= 61" is the right test.
jpeg_simple_progression (j_compress_ptr cinfo)