2006.04.07 07:34 "[Tiff] LibTiff Suggestion, Need help to support application supplied JPEGTables.", by Kelvin Zhong

2006.04.11 06:45 "Re: [Tiff] LibTiff Suggestion, Need help to support application supplied JPEGTabl es.", by Kelvin Zhong

Thanks ,all

Gerben,
Your idea is good, and what i do right now is as follows:
I define 2 Jpeg quantization tables.
and with the codes:

if(bCustomJpegTbls){
  jpeg_add_quant_table(cinfo,0,JPEG_QT_CUSTOM_LUM,100,force_baseline);
  jpeg_add_quant_table(cinfo,1,JPEG_QT_CUSTOM_CHR,100,force_baseline);
 }
 else{
  /* Set up two quantization tables using the specified scaling */
 jpeg_add_quant_table(cinfo, 0, std_luminance_quant_tbl,
        scale_factor, force_baseline);
 jpeg_add_quant_table(cinfo, 1, std_chrominance_quant_tbl,
        scale_factor, force_baseline);
 }

in jpeg_set_linear_quality function.

JPEG_QT_CUSTOM_LUM and JPEG_QT_CUSTOM_CHR are 2 global tables i used for specified custom quantization tables.