JPEG library
Included is version 6a by the IJG (Independant JPEG group). The distribution
is downloaded from: ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
Several options can be provided in the format string, for example:
-
imageObject read input.jpg -shrink -format "jpeg -grayscale"
-
imageObject write output.jpg -format "jpeg -quality 50 -progressive"
Supported options for reading:
- -fast:
-
Fast, low-quality processing
- -grayscale:
-
Force incoming image to grayscale
Supported options for writing:
- -quality N:
-
Compression quality (0..100; 5-95 is useful range)
Default value: 75
- -smooth N:
-
Perform smoothing (10-30 is enough for most GIF's)
Default value: 0.
Remark: This option doesn't work reliable with earlier versions (than 6a) of
the IJG JPEG library.
- -grayscale:
-
Create monochrome JPEG file
- -optimize:
-
Optimize Huffman table
- -progressive:
-
Create progressive JPEG file
Thanks to Tom Lane for his support. The
JPEG format handler (imgJPEG.c) is mainly written by him, although I (Jan
Nijtmans) added the support for dynamical loading.
Although imgJPEG.c should work unchanged with v5, v6 and v6a of the JPEG
library, is it advised that you upgrade to v6b if you can. There is a known
bug in the "-smooth" option of earlier versions.