Monday, December 31, 2007

fixing Exif dates

I do have a Olimpus camera that loses the camera date/time when it runs out of battery. For a long time now, i wanted to set the right time to some pictures. Finally, today i did take the time to search for a tool to fix those pics.

it is called jhead.

these are them commands i'm running

jhead -ts2007:12:27-14:30:00 *.jpg
jhead -ft *.jpg

The former does set Exif time, while the later sets the file modified time set to the Exif time.

Note that those switches may give you an unexpected result when used together.

jhead -ts2007:12:27-14:30:00 -ft *.jpg

This will not do the same. It seems -ts doesn't take effect until writing the file and -ft does what it is meant to do, but BEFORE -ts does it's work. You have to run the command twice to archive the desired effect.

maybe jhead should be smarter, and use the "about to be written Exif time" instead of the "current Exif time" in those cases when the Exif time is going to be changed/updated.