| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2006.04.11 06:45 "Re: application supplied JPEGTables", by <yourpattern@126.com>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.
|
|||||||