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 [-a(rithmetic)] [-h(elp)] [-t target_quality] [-q(uiet)] 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 a combination of the filesize, cjpeg, djpeg, tempname, and opt-jpg utilities.
OPTIONS
-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 float Use the floating-point DCT method. This is the most accurate and the default. -d int Use the standard integer DCT method. This is less accurate but faster. -d fast Use the less accurate integer DCT method. This is significantly less accurate but fastest. -h Print help and quit. -t Set the target quality value (on the IJG scale, between 0 and 100) for the images. The default value is 85. -q Quiet output. No output commentary will be printed.
EXAMPLES
Recompress a couple of image files, to see if they can be made smaller: recomp-jpg image001.jpg image002.jpg Try recompressing all JPEG images in an entire directory tree: find . -name "*.jpg" -exec recomp-jpg {} \; Or alternatively, try recompressing all JPEG images this way: find . -name "*.jpg" -print0 | xargs -0 recomp-jpg Fully utilize a quad-core system while optimizing all JPEG images: find . -name "*.jpg" -print0 | xargs -0 -n 1 -P 4 recomp-jpg find . -name "*.jpg" | parallel recomp-jpg
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.
CAVEATS
This procedure is not "lossless", so use it with caution. It is primarily intended for use with images that were originally saved with quality=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
filesize(1), cjpeg(1), djpeg(1), tempname(1), opt-jpg(1)
COPYRIGHT
Copyright (C) 2006-2023 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 2023 Mar 25 recomp-jpg(1)
littleutils 1.2.6 - Generated Mon Jun 26 07:48:08 CDT 2023