Lightroom to iPhoto export
An Adobe Lightroom to iPhone export plugin for Mac OS X.
What?
The Lightroom to iPhoto plugin exports the selected photos from Adobe Lightroom to iPhoto and creates an album with the exported photos if needed.
Why would one like to duplicate photos from Lightroom in iPhoto? Well, Lightroom is my main photo repository, but I miss the tight integration with Mac OS X like iPhoto has. iPhoto makes it easy to browse your photo library from different applications (like Finder and Mail) or export the photos to external devices (like the iPhone or iPod), Lightroom doesn’t.
The plugin was tested with Adobe Photoshop Lightroom 1.3.1 and iPhoto ’08 7.1.1, other versions may work but I didn’t check.
Installation
You can download the source code from my iPhotoExportService Github repository.
To install move the plugin folder to /Library/Application Support/Adobe/Lightroom/Modules/ to install for all users, or move it to ~/Library/Application Support/Adobe/Lightroom/Modules/ if you only want to install the plugin for a signle user. In either case you’ll have to create the Modules folder within the Lightroom folder if it’s not already there.
Restart Adobe Lightroom if it was running.
Export a few photos
Just export your photos like you would normally do but select iPhoto from the top area of the export dialog. Set the options (resolution, export format, create an iPhoto album or not, etc.) and export your photos.
Uninstalling
Simply delete it from the “Modules” folder to uninstall.
For developers
All Adobe Lightroom plugins are written in Lua. It’s not possible to address the iPhoto API directly from Lua as the API is only available for AppleScript. The plugin exports the photos to a temporary location with Lua and triggers an AppleScript that imports the photos in iPhoto. The workaround is ugly for several reasons (an intermediate file is used for the Lua - AppleScript communication, the user sees the AppleScript popping up when exporting, etc.) so if anyone knows a decent Lua to AppleScript bridge it would be nice to know.
It’s also the very first time I used Lua so feel free to perferc the code where needed. I’m planning to add the following when I can:
- Get rid of the Lua to AppleScript overhead.
- Error handling when something goes wrong.
Features I would like to add but the iPhoto API doesn’t support (yet). Let’s hope one of the following iPhoto releases updates the API.
- Creation of iPhoto folders form within the export dialog.
- Name the new iPhoto event.
You can fork the source code from the Github repository.
Update: The download link has been updated with the latest version which is Lightroom 3.x and iPhoto ’11 (9.x) compatible.