"Fossies" - the Fresh Open Source Software Archive

Member "littleutils-1.0.43/scripts/recomp-jpg.1" (11 Sep 2019, 2843 Bytes) of package /linux/privat/littleutils-1.0.43.tar.lz:


Caution: As a special service "Fossies" has tried to format the requested manual source page into HTML format but links to other man pages may be missing or even errorneous. Alternatively you can here view or download the uninterpreted manual source code. A member file download can also be achieved by clicking within a package contents listing on the according byte size field. See also the last Fossies "Diffs" side-by-side code changes report for "recomp-jpg.1": 1.0.39_vs_1.0.40.

RECOMP-JPG

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLES
NOTES
CAVEATS
SEE ALSO
COPYRIGHT

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.

-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-2012 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.