exiftran(1)

exiftran1

Transform digital camera jpeg images

Usage

exiftran [options] file1 file2 ... fileN
exiftran -i [transform options] [others options] file1 file2 ... fileN
exiftran -o outputfile [transform options] [other options] inputfile
exiftran -d file1 file2 ... fileN > exifinfo

Overview

Exiftran is a command line utility to transform digital camera jpeg images. It can do lossless rotations like jpegtran(1), but unlike jpegtran(1) it cares about the EXIF data: It can rotate images automatically by checking the exif orientation tag; it updates the exif informations if needed (image dimension, orientation); it also rotates the exif thumbnail. It can process multiple images at once.

Options

-a

Automatic (using exif orientation tag).

-9

Rotate by 90 degrees clockwise.

-1

Rotate by 180 degrees clockwise.

-2

Rotate by 270 degrees clockwise.

-f

Mirror image vertically (top / bottom).

-F

Mirror image horizontally (left to right).

-t

Transpose (across UL-to-LR corner).

-T

Transverse (across UR-to-LL corner).

-nt

Don't transform exif thumbnail.

-ni

Don't transform jpeg image. You might need this or the -nt option to fixup things in case you transformed the image with some utility which ignores the exif thumbnail. Just generating a new thumbnail with -g is another way to fix it.

-no

Don't update the orientation tag. By default exiftran sets the orientation to "1" (no transformation needed) to avoid other exif-aware applications try to rotate the already-rotated image again.

-np

Don't pare lost edges. By default exiftran don't preserve image size of the images that do not meet a multiple of 8 pixels. He prefers to cut a strip of a few pixels rather than offering a damaged image. Use this option if you want them all the same.

Options

-h

Print a short help text.

-d

Dump exif data for the file(s).

-c text

Set jpeg comment tag to text.

-g

(re)generate exif thumbnail.

-o file

Specify output file. Only one input file is allowed in this mode.

-i

Enable in-place editing of the images. Exiftran allows multiple input files then. You must specify either this option or a output file with -o for all operations which modify the image (i.e. everything but -d right now).

-b

Create a backup file when doing in-place editing (imply -i).

-p

Preserve timestamps (atime + mtime) when doing in-place editing (imply -i).

Examples

Autorotate all jpeg files in the current directory:

exiftran -ai *.jpeg

Releases

12 releases since Debian 3.1 (Sarge); the text changed 5 times.

  1. 3.1
  2. 4.0–7
  3. 8
  4. 9–12
  5. 13
  6. Arch

-np since Debian 9 (Stretch).

-c until Debian 7 (Wheezy); -o until Debian 7 (Wheezy).

Author

Gerd Hoffmann <[email protected]>

From fbida 2.14-6 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.