manpagez: man pages & more
man opt-jpg(1)
Home | html | info | man
opt-jpg(1)                  General Commands Manual                 opt-jpg(1)


NAME

       opt-jpg - losslessly optimize JPEG image files


SYNOPSIS

       opt-jpg [-a(rithmetic)] [-g(ray)] [-h(elp)] [-m markers_to_copy]
       [-q(uiet)] [-t(ouch)] file...


DESCRIPTION

       opt-jpg losslessly optimizes JPEG images.  This is accomplished using a
       combination of the filesize, jpegtran, and tempname utilities.


OPTIONS

       -a     Allow arithmetic coding to be used on re-written image files
              instead of the more prevalent Huffman coding.  This can yield
              image files that are 5-7% smaller, but older programs (image
              viewers, web browsers, image editors) might not read them
              successfully.  USE WITH CAUTION.

       -g     Force the output to grayscale.

       -h     Print help and quit.

       -m none
              Copy no markers from source file.  Identical to "-copy none"
              option from jpegtran.  This is the default.

       -m comments
              Copy only comment markers.  Identical to "-copy comments" option
              from jpegtran.

       -m icc Copy only ICC profile markers.  Identical to "-copy icc" option
              from jpegtran.

       -m all Copy all extra markers.  Identical to "-copy all" option from
              jpegtran.

       -q     Quiet output.  No output commentary will be printed.

       -t     Preserve timestamp on modified files.


EXAMPLES

       Optimize a couple of image files:
              opt-jpg image001.jpg image002.jpg

       Optimize all JPEG images in an entire directory tree:
              find . -name "*.jpg" -exec opt-jpg {} \;

       Or alternatively, optimize all JPEG images this way:
              find . -name "*.jpg" -print0 | xargs -0 opt-jpg

       Fully utilize a quad-core system while optimizing all JPEG images:
              find . -name "*.jpg" -print0 | xargs -0 -n 1 -P 4 opt-jpg
              find . -name "*.jpg" | parallel opt-jpg


NOTES

       This program may create progressive JPEG files from images that were
       previously non-progressive.  Curiously, they are sometimes smaller.


SEE ALSO

       filesize(1), jpegtran(1), tempname(1)


COPYRIGHT

       Copyright (C) 2004-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                       opt-jpg(1)

littleutils 1.2.6 - Generated Mon Jun 26 07:56:58 CDT 2023
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.