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


NAME

       rot-jpg - losslessly rotate JPEG images by 90, 180, or 270 degrees


SYNOPSIS

       rot-jpg [-h(elp)] [-f filelist] [-F(ast)] [-l(eft)] [-p(ipe)]
       [-r(ight)] [-t(ouch)] [-T threads] [-u(pside-down)] file...


DESCRIPTION

       rot-jpg losslessly rotates JPEG images using the jpegtran utility.


OPTIONS

       -h     Print help and quit.

       -f file_list
              Read the names of files to be processed from the specified file

       -F     Run faster by skipping the opt-jpg post-processing that is
              normally performed.

       -l     Rotate image by 270 degrees clockwise.  In other words, turn the
              top of the image to the left.

       -p     Read the names of files to be processed from stdin.

       -r     Rotate image by 90 degrees clockwise.  In other words, turn the
              top of the image to the right.

       -t     Preserve timestamp on modified files.

       -T threads
              Process up to the specified number of files in parallel.  The
              default value is half the multi-threading capability of the CPU,
              i.e., half the sibling count as listed in /proc/cpuinfo.

       -u     Rotate image by 180 degrees clockwise.  In other words, turn the
              image upside-down.


EXAMPLES

       Spin a couple of image files to the left:
              rot-jpg -l image001.jpg image002.jpg

       Spin all images in a directory tree to the right, utilizing half of all
       cores: find . -name "*.jpg" -print | rot-jpg -p -r

       Fully utilize a quad-core system to spin all images upside-down:
              find . -name "*.jpg" -print | rot-jpg -p -T 4 -u


NOTES

       If rot-jpg appears to be malfunctioning, try running it in single-
       threaded mode by using the -T 1 option.  This permits more meaningful
       error messages to be printed.


WARNING

       The rotation performed by rot-jpg is perfectly lossless if the image
       dimensions are an exact multiple of the JPEG iMCU size (usually 8 or 16
       pixels), which is normally the case with images coming out of a digital
       camera or cell phone.  However, if the image is not an exact multiple,
       then the extra pixels at the right and/or bottom of the image will be
       cropped.  See the jpegtran manpage for more details.


SEE ALSO

       jpegtran(1), opt-jpg(1)


COPYRIGHT

       Copyright (C) 2019-2026 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                       2026 Jan 01                       rot-jpg(1)

littleutils 1.4.0 - Generated Wed Feb 18 07:43:43 CST 2026
© manpagez.com 2000-2026
Individual documents may contain additional copyright information.