jhead

jhead is my tool of choice for command-line manipulation of images using EXIF tags on all platforms. Whoever is into Digital Photography in earnest will appreciate the ease with which it can perform batch operations with images (it also uses jpegtran to autorotate appropriately tagged images losslessly).

There is also an XML-enhanced version.

Command-lines for canonical timestamps and scaling:

jhead -exonly -nf%Y%m%d%H%M%S *.jpg
jhead -cmd "mogrify -resize 800x800 -quality 100 &i" *.jpg

Perl snippet to tag Minolta (mis-stamped) images:

#!/bin/perl

opendir(DIR, ".") or die("directory open error: $!");

foreach(readdir(DIR)) {
  if( /PICT00([0-9]+)\.JPG/ ) {
    system( "jhead -ts2004:05:20-12:00:" . $1 . " " . $_ );
  }
}