Release Notes

Open Source Used In AsyncOS 8.8 for Cisco Web Security Appliances
67
jpeg_set_defaults(cinfo);
/* Set luminance quality 90. */
cinfo->q_scale_factor[0] = jpeg_quality_scaling(90);
/* Set chrominance quality 70. */
cinfo->q_scale_factor[1] = jpeg_quality_scaling(70);
jpeg_default_qtables(cinfo, force_baseline);
CAUTION: You must also set 1x1 subsampling for efficient separate
color quality selection, since the default value used by library
is 2x2:
cinfo->comp_info[0].v_samp_factor = 1;
cinfo->comp_info[0].h_samp_factor = 1;
JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]
JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]
Pointers to Huffman coding tables, one per table slot, or NULL if
no table is defined for a slot. Slots 0 and 1 are filled with the
JPEG sample tables by jpeg_set_defaults(). If you need to allocate
more table structures, jpeg_alloc_huff_table() may be used.
Note that optimal Huffman tables can be computed for an image
by setting optimize_coding, as discussed above; there's seldom
any need to mess with providing your own Huffman tables.
The actual dimensions of the JPEG image that will be written to the file are
given by the following fields. These are computed from the input image
dimensions and the compression parameters by jpeg_start_compress(). You can
also call jpeg_calc_jpeg_dimensions() to obtain the values that will result
from the current parameter settings. This can be useful if you are trying
to pick a scaling ratio that will get close to a desired target size.
JDIMENSION jpeg_widthActual dimensions of output image.
JDIMENSION jpeg_height
Per-component parameters are stored in the struct cinfo.comp_info[i] for
component number i. Note that components here refer to components of the
JPEG color space, *not* the source image color space. A suitably large
comp_info[] array is allocated by jpeg_set_defaults(); if you choose not
to use that routine, it's up to you to allocate the array.
int component_id
The one-byte identifier code to be recorded in the JPEG file for
this component. For the standard color spaces, we recommend you
leave the default values alone.