Exporting multiple different sizes from Lightroom

Exporting multiple different sizes from Lightroom

vor 13 Jahren
Free video tutorial podcast on photography and digital photo editing
Podcast
Podcaster
Free video tutorial podcast on photography and digital photo editing

Beschreibung

vor 13 Jahren

[Update 17/2/2012: Modified the script slightly to fix a path capitalisation bug]
[Update 22/3/2013: Re-recorded the video to explain the process better]
I've been shooting a lot of model sessions lately and one of the things I always need to do after these sessions is put the processed pictures into my dropbox where the model can see them. These pictures are for a variety of different uses including Facebook, 500px, Google+, various modelling sites and, of course, print publication. 
These sites often have different size limits and requirements so I usually need to export versions with and without watermarks and at various different pixel dimensions. So it's always been a pain in Lightroom that I can only export images at one size. Here's what I export by default: 

full-size clean
full-size watermarked
2000px watermarked
1000px watermarked

That's 4 separate exports and of course I have a preset for each. It's not a *lot* of work but all those clicks bug me so I set about finding a way to export multiple different sized versions in one step. I tried a number of different approaches but the one I settled on was to write an application. Steady-on, it's not as scary as it sounds. My plan was to set up an export preset to save a full sized watermarked version then my application, called automatically from Lightroom, would take that full sized version as input and create 2 more smaller versions and save them in the same folder. The problem now, was writing the application. 
I'm on a Mac so I started looking at Automator and when that proved too limited I looked at Applescript and when that proved too hard to debug I did what any reasonable, right thinking person would do and started whining on Twitter. I have a background in programming so surely I could accomplish this apparently simple task but no, I'd wasted a whole day on this so finally I asked for help. And to my great joy a couple of people did try. I posted my broken Applescript on pastebin in a huff and the next morning John Day (@johneday on twitter) had completely rewritten and simplified it for me. Thank you so much John - you're a superstar. Here's the script he wrote for me:
on open of myFiles
set newSizes to {1000, 2000}

repeat with aFile in myFiles
set filePath to aFile's POSIX path
set bPath to (do shell script "dirname " & quoted form of filePath)
tell application "System Events" to set fileName to aFile's name
repeat with newSize in newSizes
do shell script "sips " & quoted form of aFile's POSIX path & " -Z " & newSize & " --out " & quoted form of (bPath & "/" & rename(fileName, newSize) as text)
end repeat
end repeat
end open

on rename(fName, fSize)
do shell script "sed 's/fullsize/" & fSize & "/'
15
15
Close