JPEG lossless recompressor that tries all scan possibilities to minimize size
perl jpegultrascan.pl [switches] inputfile outputfile
-s Strip all extra markers
-s some Strip only non-comment markers
-i Allow multiple planes per DC scan, which may improve compression (incompatible with some software)
-i -1 Disallow single scan DC components, which may be incompatible with some software
-j Strip APP0 segment for 18-byte savings (generates non-compliant JPEG that may be incompatible with some
software)
-j 0-14 Strip APPn segment; specify multiple times to strip different segments (generates JPEG that may be
incompatible with some software)
-a Use arithmetic coding (unsupported by most software; jpegtran support required)
-b 0-13 Maximum number of bit splits to test (default: 3)
-t [N] Number of simultaneous processes (default: 8 if specified, 1 otherwise)
-q Suppress all output
-v Verbose output
-p path Path to jpegtran (default: jpegtran)
-o path Path to other jpegtran (default: jpegtran)
- Perl
- jpegtran from libjpeg, libjpeg-turbo, and/or mozjpeg
Jpegultrascan is modeled after jpegrescan, but improves compression over jpegrescan by 5-10% by performing an exhaustive search. Resulting optimized images may have many more scans than progressive encoding, though there should be no noticeable difference on modern decoders.
Due to the exhaustive search, recompression takes longer than jpegrescan. Higher values of -b
results in longer compression times.
Optimal compression is achieved by specifying the mozjpeg version of jpegtran for the -o
switch. However, mozjpeg is slower and buggy with certain scan configurations, so IJG jpegtran is recommended for the -p
switch.
-i
generates files that are incompatible with some software such as Photoshop and Opera <= 11.61. -i -1
generates files that are compatible with IPP JPEG.
Jpegultrascan is compatible with arbitrary numbers of channels, including CMYK, and ICC profiles.
Aaron Kaluszka <[email protected]>