How-To: Edit or Batch Edit Your Digital Photo’s EXIF Metadata with JHead

Over the weekend I took a large number of photos with my digital camera and noticed once I tried to import them into my favorite photo manager that the dates were off by two years and the time taken by three hours. To say the least I was a little perplexed. The only explanation I could come up with was that inadvertently changed the time/date settings after having a few too many drinks at the party. In any event, I went in search for an EXIF (Exchangeable Image File Format) editor and came across an incredibly powerful free, cross-platform (Linux / Unix / BSD / OS X / Windows) command line application called JHead (tip: check your application repository for availability, if you’re running a Unix variant – Windows user’s just download the .exe).
After reviewing the application’s man page, the process for editing the EXIF data was a piece of cake. Below are the commands I used. I hope this program helps others as it did me.
First open up your terminal and change your path to the directory with the photos you wish to edit. Once there, you can use the following commands to edit the time and date. Note: I trail the command with an asterisk (*) instead of a filename to batch edit all the files in a folder – you can, of course, specify a single JPEG by name to edit it individually (see man page for details).
View a JPEG’s EXIF metadata
COMMAND: jhead {filename}
EXAMPLE (see screenshot): jhead CIMG2385.JPG
Change all JPEG files in a folder to a new date
COMMAND: jhead -da[newdate]-[olddate] {filename}
EXAMPLE (from 2005 to 2007): jhead -da2007:03:25-2005:03:25 *
Change time up or down a few hours
COMMAND: jhead -ta<+|->[timediff] {filename}
EXAMPLE (up three hours): jhead -ta+3:00 *
Of course there are many more useful commands in JHead, but at least you get an idea what you can do and how easily you can do them. Big thanks goes to Matthias Wandel for developing such a wonderful program!
Filed in: Software
-
geosoar






