1JPEGOPTIM(1)                General Commands Manual               JPEGOPTIM(1)
2
3
4

NAME

6       jpegoptim - utility to optimize/compress JPEG/JFIF files.
7
8
9

SYNOPSIS

11       jpegoptim [ options ] [ filenames ]
12
13

DESCRIPTION

15       jpegoptim  is  used  to  optimize/compress jpeg files. Program supports
16       lossless optimization, which is based on optimizing the Huffman tables.
17       And  so  called  "lossy"  optimization  where in addition to optimizing
18       Huffman tables user can specify upperlimit for image quality.
19
20       NOTE! By default jpegoptim modifies the input files (if they are  opti‐
21       mized),  to  preserve original files use option -d to specify alternate
22       directory for saving the optimized files to.
23
24       Only normal files are optimized (symbolic links and special  files  are
25       skipped).   Also,  any other hard links to the file being optimized (as
26       created using link(2)) are unaffected.
27
28
29

OPTIONS

31       Options may be either the traditional POSIX one letter options, or  the
32       GNU style long options.  POSIX style options start with a single ``-'',
33       while GNU long options start with ``--''.
34
35       Options offered by jpegoptim are the following:
36
37       -d<path>, --dest=<path>
38             Sets alternative destination directory where  to  save  optimized
39             files  (default  is to overwrite the originals). Please note that
40             unchanged files won't be added to the destination directory. This
41             means  if  the  source  file can't be compressed, no file will be
42             created in the destination path.
43
44       -f, --force
45             Force optimization, even if the result would be larger  than  the
46             original file.
47
48       -h, --help
49             Displays short usage information and exits.
50
51       -m<quality>, --max=<quality>
52             Sets  the  maximum  image quality factor (disables lossless opti‐
53             mization mode, which is by default  enabled).  This  option  will
54             reduce quality of those source files that were saved using higher
55             quality setting.  While files that  already  have  lower  quality
56             setting  will  be  compressed  using  the  lossless  optimization
57             method.
58
59             Valid values for quality parameter are: 0 - 100
60
61       -n, --noaction
62             Don't really optimize files, just print results.
63
64       -S<size>, --size=<size>
65             Try to optimize file to given size (disables  lossless  optimiza‐
66             tion  mode). Target size is specified either in kilobytes (1 - n)
67             or as percentage (1% - 99%) of the original file size.
68
69       -T<threshold>, --threshold=<threshold>
70             Keep the file unchanged if the compression gain is lower than the
71             threshold (%).
72
73             Valid values for threshold are: 0 - 100
74
75       -b, --csv
76             Print progress info in CSV format.
77
78       -o, --overwrite
79             Overwrite target file even if it exists (when using -d option).
80
81       -p, --preserve
82             Preserve file modification times.
83
84       -P, --preserve-perms
85             Preserve file permissions (owner/group) by overwriting the origi‐
86             nal file. This is slightly less safe than  the  default  mode  of
87             operation  (where  new  file is first saved as temporary file and
88             then renamed over the original file).  In this mode a  backup  of
89             the original file is made with .jpegoptim.bak extension, and this
90             file is removed after the original  file  has  been  successfully
91             replaced.   NOTE! if running jpegoptim as root there is generally
92             no need to use this option, as jpegoptim is able to preserve file
93             permissions when run by root in default mode.
94
95       -q, --quiet
96             Quiet mode.
97
98       -t, --totals
99             Print totals after processing all files.
100
101       -v, --verbose
102             Enables verbose mode (positively chatty).
103
104
105       --all-normal
106             Force all output files to be non-progressive. Can be used to con‐
107             vert all input files to progressive JPEGs when used with  --force
108             option.
109
110       --all-progressive
111             Force  all output files to be progressive. Can be used to convert
112             all normal (non-progressive) JPEGs  input  files  to  progressive
113             when used with --force option.
114
115
116       -s, --strip-all
117             Strip  all  markers from output file. (NOTE! by default only Com‐
118             ment & Exif/IPTC/PhotoShop/ICC/XMP markers are  kept,  everything
119             else  is  discarded).  Output JPEG still likely will contains one
120             or two markers (JFIF and Adobe  APP14)  depending  on  colorspace
121             used  in the image, as these markers are generated by the libjpeg
122             encoder automatically.
123
124       --strip-none
125             Preserve "all" markers in the image. This will leave all  markers
126             untouched  in  the  image,  except  JFIF (APP0) and Adobe (APP14)
127             markers as those get regenerated by the libjpeg library.
128
129       --strip-com
130             Strip Comment (COM) markers from output file.
131
132       --strip-exif
133             Strip EXIF markers from output file.
134
135       --strip-iptc
136             Strip IPTC / Adobe Photoshop (APP13) markers from output file.
137
138       --strip-icc
139             Strip ICC profiles from output file.
140
141       --strip-xmp
142             Strip XMP profiles from output file.
143
144
145
146       --stdout
147             Send output image  to  standard  output.  Note,  if  optimization
148             didn't  create  smaller  file than the input file, then no output
149             (image) is sent to standard output. (Option -f  can  be  used  to
150             force  output  of  image  always, even if optimized image was not
151             smaller than input).
152
153
154       --stdin
155             Read input image from standard input. When this  option  is  used
156             then  only  one  image  is read from standard output. Any (other)
157             input files specified on command  line  are  ignored.   Note,  if
158             input  file  '-'  is  seen on command line then standard input is
159             also assumed.
160
161             Currently this option will explicitly enable -f option, thus out‐
162             put image is always sent to standard output (even if no optimiza‐
163             tion was possible).
164
165
166
167

BUGS

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

SEE ALSO

175       jpeginfo(1)
176
177

AUTHOR

179       Timo Kokkonen <tjko@iki.fi>
180
181

COPYING

183       Copyright (C) 1996-2018  Timo Kokkonen
184
185       This program is free software; you can redistribute it and/or modify it
186       under  the  terms of the GNU General Public License as published by the
187       Free Software Foundation; either version 2 of the License, or (at  your
188       option) any later version.
189        This  program  is  distributed in the hope that it will be useful, but
190       WITHOUT ANY  WARRANTY;  without  even  the  implied  warranty  of  MER‐
191       CHANTABILITY  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
192       Public License for more details.
193        You should have received a copy of  the  GNU  General  Public  License
194       along with this program; if not, write to the Free Software Foundation,
195       Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
196
197
198
1994th Berkeley Distribution         17 Apr 2018                     JPEGOPTIM(1)
Impressum