Apple Aperture is a powerful program, but it doesn’t have as many automatic actions as I would have wanted. You can apply chromatic aberration (color fringing) corrections for example, and you can save correction presets for all your lenses, but you can’t automatically apply those presets based on the lens that was used. Or can you? Actually, you can!

In the Aperture Import dialog you can set an adjustment preset that will be applied to all imported images, but you can’t use this option for chromatic aberration correction presets. That’s because you need a different preset for each lens, and with zoom lenses you may even need more than one preset per lens, based on the focal length. The Import dialog also offers you the option to run an AppleScript on all the imported images however, and that’s how you can achieve this. First, you need to make presets for each lens and for different focal lengths in case of zoom lenses. In this example I have two zoom lenses, the Canon EF 70-300mm f/4-5.6L IS USM and the Canon EF 24-70mm f/2.8L. I made two presets per lens, for the shortest and longest zoom position and called them like this: “24-70mm @ 24mm”. Of course the preset for 24mm on the 24-70mm lens will also apply to images taken with 25mm or 26mm, so I want to apply this preset to any image that was taken with a focal length that is shorter than 35mm. I use similar ranges for the other zoom ends. Obviously, you can use different cut-off values.

Open AppleScript Editor and copy/paste the following AppleScript. Save this script with an appropriate name in an appropriate place.

on ImportActionForVersions(selectedImages)
tell application “Aperture”
set Telezoom70 to get image adjustment preset named “70-300mm @ 70mm”
set Telezoom300 to get image adjustment preset named “70-300mm @ 300mm”
set Standardzoom24 to get image adjustment preset named “24-70mm @ 24mm”
set Standardzoom70 to get image adjustment preset named “24-70mm @ 70mm”
tell library 1
repeat with i from 1 to count of selectedImages
tell item i of selectedImages
set focalLength to (value of EXIF tag “FocalLength”)
set Lens to (value of EXIF tag “LensModel”)
if Lens = “Canon EF 70-300mm f/4-5.6L IS USM” then
if focalLength > 200 then apply image adjustment preset Telezoom300
if focalLength < 150 then apply image adjustment preset Telezoom70 end if if Lens = "Canon EF 24-70mm f/2.8L" then if focalLength < 35 then apply image adjustment preset Standardzoom24 if focalLength > 60 then apply image adjustment preset Standardzoom70
end if
end tell
end repeat
end tell
end tell
end ImportActionForVersions

Now open the Aperture Import dialog. In the upper right corner, you can select the Import Settings options. Activate the Actions option, and attach your script using the ‘Choose…’ button. That’s it! From now on, all your images taken with these two lenses will automatically be corrected for chromatic aberration, based on your four presets. Obviously, you can use the same script for all kinds of other automatic corrections, based on camera model, ISO value, etcetera. The possibilities are endless.

Attach the AppleScript to the Import dialog of Apple Aperture

Attach the AppleScript to the Import dialog of Apple Aperture

Tagged with:
 

Comments are closed.