At Home He's A Tourist.

Gang of photos. Taken from all over the world.

Anonymous asked: After importing images from my digital camera to Apple Aperture, my lens is displayed as "Unknown (160) 11–16 mm" in the image's metadata tab. How do I fix that?

After buying a new lens (Tokina 11–16 mm f/2.8) for my Canon EOS 600D (Rebel T3i) I took some pictures. When importing them to Aperture, the lens was identified as “Unknown (160) 11–16 mm" in the metadata tab.

Exploring the complete EXIF data set with Phil Harvey’s great ExifTool revealed that the correct lens information could be found in the LensID tag, while Aperture seems to use the sometimes incomplete Lens tag to display the lens data.

Now, how could you copy the content from LensID to Lens? Well, there’s no way to do it in Aperture directly. One solution would be to use the command line utility ExifTool:

/usr/bin/exiftool -overwrite_original_in_place -P
  -tagsfromfile @ '-Lens<LensID' IMG001.jpg

The command above overwrites the tag Lens (= “Unknown (160) 11–16 mm”) with the content of the tag LensID (= “Tokina AT-X 116 AF Pro DX 11–16mm f/2.8”).

I looked for a more convenient way to achieve this. So I came up to write my first AppleScript application, called CorrectLensEXIF. To use it, follow these steps:

1. Download and install “ExifTool”

Phil Harvey’s ExifTool is required. Download it from Phil’s homepage and install it on your Mac.

2. Download and install “CorrectLensEXIF”

Download CorrectLensEXIF.dmg (1.5 MB) and install the app. Now you’re ready to fix your metadata in Aperture.

3. Select some images in Aperture

Launch Aperture and select one or more images with incorrect lens metadata. Now start the CorrectLensEXIF app. Your screen should look like this:

screenshot 1

Click “Start” to continue. You will be asked if you really want to modify the EXIF data of your image (this cannot be undone!).

screenshot 2

Now look at the result: The lens used to take this photo is displayed correctly in Aperture!

screenshot 3

What the app does is basically iterating through a selection of Aperture photos and execute ExifTool on each of the photos. With a little programming experience in AppleScript (using the XCode environment) you can easily implement lots of other EXIF modifying features (batch correction of date/time, for example). Feel free to use the source code!

Update 2012/06/23:

In version 2.1 you have more options to modify the lens information. Download the latest version of CorrectLensEXIF below.

Downloads

CorrectLensEXIF (MacOS X App) | 1.5 MB
CorrectLensEXIF (source code) | 432 KB
ExifTool (command line) | Link