recomp-jpg(1) General Commands Manual recomp-jpg(1)
NAME
recomp-jpg - try to recompress JPEG image files that were saved at too
high a quality level
SYNOPSIS
recomp-jpg [-h(elp)] [-a(rithmetic)] [-f filelist] [-p(ipe)] [-q(uiet)]
[-t target_quality] file...
DESCRIPTION
recomp-jpg tries to recompress JPEG images that were initially saved at
too high a quality level, to see if they can be made smaller. This is
accomplished using the opt-jpg utility.
OPTIONS
-h Print help and quit.
-a Allow arithmetic coding to be used on re-written image files
instead of the more standard Huffman coding. This can yield
image files that are 5-7% smaller, but older software (image
viewers, web browsers, image editors) might not read them
successfully. USE WITH CAUTION.
-d DCT_arithmetic
Specify the type of DCT arithmetic to use. The choices are
"float" (the default), "int" (less accurate but a little
faster), and "fast" (not recommended). See cjpeg(1) for more
details. This option only applies when the -M option is used.
-f file_list
Read the names of files to be processed from the specified file.
-p Read the names of files to be processed from stdin.
-q Quiet output. No output commentary will be printed.
-t Set the target quality value (on the IJG scale, between 0 and
100) for the images. The default value is 85.
EXAMPLES
Recompress a couple of image files, to see if they can be made smaller:
recomp-jpg image001.jpg image002.jpg
Try all JPEG images in an directory tree, utilizing half of all cores:
find . -name "*.jpg" -print | recomp-jpg -p
Fully utilize a quad-core system while optimizing all JPEG images:
find . -name "*.jpg" -print | recomp-jpg -p -T 4
NOTES
Each image is recompressed to the target quality value. If the
recompressed version is smaller, it is kept. If it is not smaller,
then the recompressed version is discarded and the original remains
unchanged.
Also, as of littleutils-1.4.0, the recomp-jpg utility is now a simple
wrapper around an expanded opt-jpg utility. In prior versions, it was
a more complete separate program.
CAVEATS
This procedure is not "lossless", so use with caution. It is primarily
intended for use with images that were originally saved with a quality
of 90 or higher, where the file sizes can become much larger with
little or no perceptible improvement in image quality.
See http://www.faqs.org/faqs/jpeg-faq/ for more information about the
effects of JPEG quality settings.
SEE ALSO
cjpeg(1), djpeg(1), opt-jpg(1)
COPYRIGHT
Copyright (C) 2004-2026 by Brian Lindholm. This program is free
software; you can use it, redistribute it, and/or modify it under the
terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
littleutils 2026 Jan 01 recomp-jpg(1)
littleutils 1.4.0 - Generated Wed Feb 18 07:40:23 CST 2026
