Automating Aperture and Photoshop
While Aperture’s toolset provides most of the editing features you’ll need for most of your digital imaging post-production, there are still many occasions for which you’ll need to do additional processing in Photoshop. Whether it’s for simple CMYK conversion, to apply a Photoshop plug-in, or for more complex operations that aren’t possible in Aperture, you might regularly find yourself integrating Photoshop into your Aperture workflow. If you find yourself doing this a lot, then you’ll want to consider automating the process. When powered by Automator, these two applications provide enough automation capabilities for you to easily create complex automated production pipelines.
In this article, we’ll cover several different techniques for automating your Aperture/Photoshop pipelines. While Aperture ships with several built-in Automator actions, you’ll need some additional ones to follow along with these tutorials. First, download and install the Photoshop Action Pack, then install the Start Photoshop Roundtrip action. Installation instructions are included with both products.
All of your Automator/Photoshop workflows will begin, of course, in Automator. Your first step for any workflow will be to get your images out of Aperture and into a location where they can be opened by Photoshop. The best way to do this will vary depending on how you choose to organize your work in Aperture.
Aperture is not currently a very scriptable application, but it does provide good import and export facilities, and ships with built-in Automator actions for performing these tasks. For many instances, using these Export options will be the best way to build your workflows.
Suppose you regularly need to output CMYK versions of your finished work. Aperture provides no CMYK conversion, but Photoshop does. Let’s create a workflow that automatically exports all of the images from a specific Aperture album, then opens those images in Photoshop, converts them to CMYK, and then saves the results.
1. Launch Automator, Aperture, and Photoshop. Automator can automatically launch Aperture and Photoshop for you when you run your workflow, but if you open them all now then you won’t have to wait when you first run your worklow. A blank workflow should appear in Automator.
The first thing we want to do in our workflow is to select the album that we want to export.
2. Click on Aperture in the Library pane to see the actions provided by Automator. In the Action pane, double-click on Choose Albums to add a Choose Albums action to your workflow. Aperture will immediately display a list of all of the albums in your Aperture library. Check the box next to a fairly small album. Ultimately, we’ll want the user to be able to select an album when the workflow is run, but for now we want an action to use for testing purposes.
3. In the Action pane, double-click on Export Images. This action will export the images that were selected in the previous action. In the Export Setting pop-up menu, you’ll find all of the same Export presets that are currently defined in Aperture.
4. Select TIFF – Original Size (8-bit). Use the Destination pop-up menu to select a location to export the images into. If you select Other, you will be presented with a standard Save dialog box, where you can create a new folder for saving.
This takes care of our export chores. Now we’re ready to convert the exported images to CMYK using Photoshop. The Export Images action passes a list of the images that it exported to the next action in the workflow.
5. Click on Photoshop CS2 (or Photoshop CS if that’s what you’re using) in the Library pane. In the Action pane, scroll until you find Open. Double-click on it to add it to the end of your workflow. The Open action will tell Photoshop to open the images that were passed from the Export Images action.
6. In the Action pane, double-click on Change Mode to add a mode changing action to the end of your workflow. Change the To pop-up menu to CMYK.
The Photoshop actions are designed so that no documents are opened or processed in Photoshop until a Render action is executed. This ensures that too many documents won’t open at once and bog Photoshop down.
7. In the Action pane, double-click on Render to add a Render action. In addition to performing the actual Photoshop commands that you’ve specified, the Render action is also where you perform any save operations that you want. We could easily perform any number of Save As operations into different formats, but we don’t need to create any more documents, because our originals are still in Aperture. Instead, we’ll simply save back into the file that Aperture exported.
8. Click the Save button at the top of the Action workflow. This will perform a normal Save operation in Photoshop, saving the results of the mode change back into the original file.
You’re now ready to test your workflow.
9. Click the Run button at the top of the window, or press Command-R. You can follow the status of the workflow at the bottom of the window. Once the Render action starts executing, Photoshop will come to the front. If the workflow doesn’t work, double-check the steps and try again.
If the workflow executes successfully, you’re ready to build a final, working copy. While running the workflow from within Aperture is fine, having a stand-alone application will be a little easier for day-to-day work.
1. Scroll the workflow back up to the Choose Albums action and twirl open the Options section. At runtime, you’ll want to be able to select the Album that you want to process so, in the Options section, check the Show Action When Run box. This will display the action at runtime, and give you the chance to select the album that you want to convert.
2. Now select File > Save As, enter a name and choose a location to save the file. Change the File Format pop-up menu to Application and then press Save.
3. Quit Automator, go to the Finder, and find the application that you created. Double-click it to launch it, and your workflow should execute just as it did within Automator.
Creating a Folder Action
Creating a stand-alone application like you did earlier is a great solution for launching a complex workflow from the Finder. However, if you’re working within Aperture itself, having to switch to the Finder to start a workflow can be a bit of a drag. For these instances, you’ll want to consider attaching your workflow to a specific folder. Then, any images that are dropped into that folder will be sent to that workflow. This means that you can trigger a workflow simply by using Aperture’s Export Version command to save images into your chosen folder.
Let’s make a Folder Action version of our previous example.
1. Begin by making a new folder in the Finder. Call it Convert to CMYK.
2. In Automator, create a new workflow. Click on Finder in the Library pane, and then double-click on Get Selected Finder Items to add the action to your workflow.
3. Click on Photoshop in the Library pane, and add an Open action to the end of your workflow.
4. Now add your Change Mode and Render actions, just as you did in the previous version. Set Change Mode to CMYK, and set the Render action to Save.
5. Select File > Save as plug-in. Enter Convert to CMYK, and select Folder Actions from the Plug-in for pop-up menu. A new menu will appear called Attached to Folder. Open the menu, select Other, then navigate to the Convert to CMYK folder that you made earlier. Select the folder, then click Save.
6. Now test your action. Switch to Aperture, select an image, and choose File > Export Version. Save the image as a full-res TIFF into the Convert to CMYK folder that you created. Aperture should save the image, and when it’s done the picture should automatically open in Photoshop and run through the conversion workflow.
With either of these approaches, your workflow can be as complex as you want. Note that the Photoshop Action Pack also includes a Do Action action which lets you launch one of Photoshop’s internal actions. The ability to launch Photoshop actions from within an Automator workflow means you have access to almost all of Photoshop’s functionality, and you can trigger all of it using either of the mechanisms we’ve seen so far. The Action Pack also provides filter operations that let you filter your images so that they can be processed in different ways depending on their properties – something you can’t do in Photoshop or Automator alone. Consult the Action Pack documentation for more information on these features.
The techniques shown so far are great for times when you want to end up with processed images outside of Aperture. However, Aperture includes a great “round-trip” capability that allows you to send an image into your external image editor, manipulate it, and then save the changed version directly back into your Aperture library, saving you the hassle of Exporting and re-importing.
Using the Start Photoshop Round-Trip action, you can build Automator workflows that include this round-trip functionality. After building your workflow, simply select the images in Aperture that you want to send on a round-trip, and then run the workflow. Automator will take care of starting the round-trip, will process your images according to your workflow, and will then save them, which will land them right back in Aperture.
This type of workflow is very easy to configure. For the sake of example, let’s assume that you have a Photoshop action that you’ve created that you regularly use to achieve a certain look in your images. You can launch that action using the Do Action Automator action, but for the sake of this example we’ll simply use the Diffusion action that’s included with Photoshop.
Our goal is to create a workflow that takes the images that are currently selected in Aperture, performs our diffusion effect in Photoshop, and returns the images directly into Aperture.
1. In Automator, create a new Workflow.
2. Click on Aperture in the Library pane, and then double-click Start Photoshop Roundtrip to add the action to the workflow. This action will take the selected images in Aperture and launch them in Photoshop using the Open in External Editor command in Aperture. For this to work, you must have GUI Scripting enabled, as explained in the installation instructions that came with the action. If you didn’t do this before, you must do it now.
At the end of this first action, your selected documents will be open in Photoshop. Because the documents are already open, we don’t need to issue a Photoshop Open command. However, we do need to tell Automator that we want to work with those currently open documents.
3. Click on Photoshop in the Library pane and then double-click on Use Currently Open Documents in the Action pane.
4. Now double-click on Diffusion in the Action pane to add the Diffusion effect to your workflow. Accept the default settings. You can either choose to use the Flatten option or not – for the sake of this example it doesn’t really matter.
5. Add any other effects or edits that you want, then double-click on the Render action in the Action pane to add a Render action to the end of your workflow.
6. Check the Save checkbox to tell the Render action to perform a straight save. This save will save the image back into your Aperture library. Note that you can also check Save as buttons to save addition versions into other locations.
7. Save your Workflow and call it Add Diffusion.
8. Now switch to Aperture and select some images.
9. Return to Automator and press the Run button on your workflow, or press Command-R. This will start the workflow.
The first thing it will do is ask you how many images are currently selected. Unfortunately, there’s no way to determine this with Aperture’s current AppleScript dictionary, so you have to enter the number of selected images by hand.
10. Enter the number of images and press Okay. Aperture will create new versions of your images and then open those versions in Photoshop.
The Start Photoshop Roundtrip action does not pass control to the next action until the specified number of images have been opened. Once they are, the rest of your workflow will open.
That’s it! You’re now automating your Photoshop operations from within Automator. Between the functionality built-in to the Photoshop Action Pack, and the functionality you can access from Photoshop’s internal actions, you should be able to create workflows that launch images from Aperture into complex Photoshop processes. And while they’re cooking, you can go out and shoot!