exiv2

Exiv2 is a C++ library and a command line utility to manage image metadata. http://www.exiv2.org.

Orientation

Rotations and exif orientation values:

Example:

exiv2 -M"set Exif.Image.Orientation 6" *jpg

Information on orientation here: http://jpegclub.org/exif_orientation.html

Time and date manipulations

Use -a to change time and date.

Example: to add 5 hours, use:

exiv2 -a 5 *jpg

I set the year wrong on a camera (was 2007, should have been 2008). I used:

exiv2 -Y1 *jpg

to correct it.

To subtract use:

exiv2 -Y'-1' *jpg