Swapping EXIF information

A lot of my images are panoramic stitches, and increasingly I’ve been trying to use Lightroom where possible to keep things in a full-DNG workflow as long as possible. I’ve found that Lightroom is great when it works, but not so great when it doesn’t. 

One of the things that Lightroom simply refuses to do (which isn’t a problem in dedicated stitching packages) is combine images taken at “different” focal lengths. I say “different” here because occasionally, if you’re shooting with a zoom lens, you can have the zoom set in just such a way that it doesn’t constantly report the same focal length to the camera in EXIF data. 

This happened in a nasty way last Saturday. I lucked out and had a great sunset on the Blue Ridge Parkway, but came home to find that about 2/5 of my images were “shot” at 48mm, and about 3/5 of them “shot” at 50mm. 

If this happens to you, do not despair – there Phil Harvey has written a program called exiftool that will save the day. The code to execute what you need is:

exiftool -n -EXIF:FocalLength=50 -EXIF:FocalLengthIn35mmFormat=50 <<Folder with images>>

Obviously replace the 50 with whatever focal length you shot at. Exiftool will write new files with the modified EXIF information, and save the old files for you as well. You’ll have to either re-import the files into Lightroom, or you can force Lightroom to re-read the metadata for the affected images by going to “Metadata->Read Metadata From Files” (note: this will destroy any keywords you’ve given to the images). 

From there, you’re good to move on and process the file:

Thankfully this wasn’t ruined. Though there were many processing shenanigans to salvage it.

Leave a Reply