New option "Use custom quality settings" for JPEG files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As discussed last month, the JPEG save dialog will now help you topick more appropriate quality settings if your image was originallyloaded from a JPEG file.  Two weeks ago, I modified the jpeg plug-inso that it detects and saves the quality settings when loading a JPEGimage.  This includes the overall quality level, the subsamplingparameters and the quantization tables if they are different from theones that can be generated by the IJG JPEG library.  The quality leveland subsampling parameters of the original image will be used asinitial values when saving the image if they are better than yourdefault settings.
Since Friday, I added a new option to the JPEG save dialog: "Usecustom quality settings".  If some quantization tables were attachedto the image when it was loaded, then this option allows you to usethem instead of the standard ones (different quantization tables aregenerated by the IJG JPEG library for each quality level).
If you have only made a few changes to the image, then re-using thesame quantization tables will give you almost the same quality andfile size are the original image.  This will minimize the lossescaused by the quantization step, compared to what would happen if youused different quantization tables.
The following table shows several examples of JPEG files that Ire-saved using three different settings:- default GIMP settings (quality 85, chroma subsampling 2x2),- similar quality and sampling parameters (detected from original),- with new option "custom quality settings" (re-use quant. tables)
The colums in the table show the mean difference in value for allpixels of the image, the maximum difference in value, the size of theDCT compressed data saved on disk (excluding comments, thumbnail andmetadata) and the relative difference in size.
                              Mean diff. Max diff. Size on diskNikon D70 (Fine) - 3008x2000                         2521329- Default                        2.1        21        575341  -77%- Quality 98, sampling 2x1       0.6         6       2377909   -6%- Custom quantization tables     0.2         5       2471203   -2%
Nikon D70 (Normal0 - 3008x2000                       3394771- Default                        3.6        31       1301350  -62%- Quality 97, sampling 2x1       0.4        10       3256047   -4%- Custom quantization tables     0.4        10       3255992   -4%
Canon G5is (Superfine) - 3264x2448                   2985249- Default                        2.9        39        899083  -70%- Quality 95, sampling 2x1       1.4        14       2373022  -21%- Custom quantization tables     0.3        11       2949326   -1%
Sony DSC-D700 (Fine) - 1344x1024                      676492- Default                        3.3        61        175496  -74%- Quality 97, sampling 2x1       1.4        18        603643  -11%- Custom quantization tables     0.5        17        636818   -6%
Photoshop (Save for web 100%) - 500x333               112425- Default                        3.2        45         32624  -71%- Quality 98, sampling 1x1       0.9         7        110693   -1%- Custom quantization tables     0.2         5        121285   +7%
Photoshop (Save for web 3%) - 921x921                 102471- Default                        0.6        15        173831  +70%- Quality 45, sampling 2x2       2.5        17        138955  +35%- Custom quantization tables     0.0         9        112797  +10%
SonyEricsson K750i (Fine) - 1632x1224                 510916- Default                        3.9        36        539013   +5%- Quality 76, sampling 2x1       0.7        35        507275   -1%- Custom quantization tables     0.1        28        507543   -1%
These examples show that re-using the same quantization tables as theoriginal image minimizes the differences in the image and producesalmost the same file size.  Editing images in a lossy format such asJPEG is not recommended, but at least this new feature allows you tominimize the quality degradation in case your source images are notavailabe in a lossless format.
As far as I know, this ability to re-use custom quantization tables isunique to GIMP.  Even Photoshop does not allow you to do that easily.Some command-line programs such as IJG's cjpeg allow you to supplyyour own quantization tables, but this is not as convenient.
-Raphaël_______________________________________________Gimp-developer mailing listGimp-developer@xxxxxxxxxxxxxxxxxxxxxxxxxxx://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux