AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2006.04.07 07:34 "[Tiff] LibTiff Suggestion, Need help to support application supplied JPEGTables.", by yourpattern
2006.04.07 09:01 "Re: [Tiff] LibTiff Suggestion, Need help to support application supplied JPEGTables.", by Joris
2006.04.07 10:05 "Re: [Tiff] LibTiff Suggestion, Need help to support application supplied JPEGTable s.", by yourpattern
2006.04.10 14:21 "Re: [Tiff] LibTiff Suggestion, Need help to support application supplied JPEGTables.", by Gerben Vos
2006.04.11 06:45 "Re: [Tiff] LibTiff Suggestion, Need help to support application supplied JPEGTabl es.", by yourpattern
2006.04.11 08:33 "Re: [Tiff] LibTiff Suggestion, Need help to support application supplied JPEGTables.", by Joris
2006.04.11 09:54 "Re: [Tiff] LibTiff Suggestion, Need help to support application supplied JPEGTables.", by Gerben Vos
2006.04.11 10:12 "Re: [Tiff] LibTiff Suggestion, Need help to support application supplied JPEGTables.", by Joris

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

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.