Ubuntu Manpages

jpegoptim

utility to optimize/compress JPEG/JFIF files.

jpegoptim [ options ] [ filenames ]

jpegoptim is used to optimize/compress jpeg files. Program supports lossless optimization, which is based on optimizing the Huffman tables. And so called "lossy" optimization where in addition to optimizing Huffman tables user can specify upperlimit for image quality.

Options may be either the traditional POSIX one letter options, or the GNU style long options. POSIX style options start with a single ``-'', while GNU long options start with ``--''.

Options offered by jpegoptim are the following:

Sets alternative destination directory where to save optimized files (default is to overwrite the originals). Please note that unchanged files won't be added to the destination directory. This means if the source file can't be compressed, no file will be created in the destination path.
Force optimization, even if the result would be larger than the original file.
Displays short usage information and exits.
Sets the maximum image quality factor (disables lossless optimization mode, which is by default enabled). This option will reduce quality of those source files that were saved using higher quality setting. While files that already have lower quality setting will be compressed using the lossless optimization method.

Valid values for quality parameter are: 0 - 100

Don't really optimize files, just print results.
Try to optimize file to given size (disables lossless optimizaiont mode). Target size is specified either in kilobytes (1 - n) or as percentage (1% - 99%) of the original file size.
Keep the file unchanged if the compression gain is lower than the threshold (%).

Valid values for treshold are: 0 - 100

Overwrite target file even if it exists (when using -d option).
Preserve file modification times.
Quiet mode.
Print totals after processing all files.
Enables verbose mode (positively chatty).

Force all output files to be non-progressive. Can be used to convert all input files to progressive JPEGs when used with --force option.
Force all output files to be progressive. Can be used to convert all input files to normal (non-progressive) JPEGs when used with --force option.

Strip all (Comment & Exif) markers from output file. (NOTE! by default only Comment & Exif markers are kept, everything else is discarded)
Strip Comment (COM) markers from output file.
Strip EXIF markers from output file.
Strip IPTC markers from output file.
Strip ICC profiles from output file.

When using --size option, resulting file is not always exactly the requested size. Workaround is to re-run jpegoptim on the same file again which often will result file closer to target size.

jpeginfo(1)

Timo Kokkonen <tjko@iki.fi>

Copyright (C) 1996-2013 Timo Kokkonen

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, 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.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.