Tuesday, March 31, 2009

Geo-tagging photos - fixing the file date and time

I've now got a reasonable work flow. Ensure the GPS Logger is running, export the file to GPSX format, import the log and the photos into GPSPhotoLinker, apply the lat/long location data.

There is one thing that remains, and its bugged me in a more general sense for a while. If you do anything to the file eg adjust / change / update the EXIF data, rotate the image etc, you change the file and the file date and time now show when you changed the file, not when you took the photo.

One answer is to use 'jhead' to apply the EXIF date to the file date. Download the binary and put it someone handy. I usually create a folder for it, so its path becomes

    /applications/jhead/jhead
Then ensure it is executable:

    chmod +x jhead

then switch to where the photos are that need adjusting:

    cd ~/pictures/GPS_logged

and then run the command

    /applications/jhead/jhead -ft *.jpg

and

    /applications/jhead/jhead -ft *.JPG

curiously I found that on single files it is not case sensitive, while doing '*' it is:

    Error : No such file
    in file '*.jpg'

It could be pointed out that using Apple Preview to rotate my photos is lossy... well if this proves a problem with a particular file I can always use the lossless rotation in GraphicConverter or go back to the raw file (the .NEF).

No comments: