Recording Batch ActionsWriting actions for batch-processing raw images is relatively simple. You don't need to worry about making sure that the action can operate on files that already have layers or alpha channels, or that are in a color space other than RGB. You're always dealing with a known quantity.Bear in mind that if your actions call other actions, the other actions must be loaded in Photoshop's Actions palette, or the calling action will fail when it can't find the action being called. An easy way to handle this is to make sure that any actions on which other actions are dependent are saved in the same set as the actions that depend on them.I'll start out with simple examples and proceed to more complex ones. Simple ActionSave as JPEGI'll start with a very simple action that opens a raw image at its native resolution and saves it as a maximum-quality JPEG in the sRGB color space. Creating an action and action setStart out by creating a new action set called "Batch Processing" in which to save the actions you'll create in the rest of this section. So the first step is to create a new action set, which you do by opening the Actions palette and clicking the folder ("Create new set") icon and then entering the appropriate name in the ensuing dialog box and clicking OK to dismiss it. The new set then appears in the Actions palettesee Figure 9-2. Figure 9-2. Creating an action setTo create a new action set, click the "Create new set" icon, enter a name, then click OK. The new set appears in the Actions palette.![]() ![]() ![]() Creating a new actionBefore creating the action, select a raw image in Bridge that has already had custom Camera Raw settings applied. That way, once you've created the action, you can start recording immediately without recording any extraneous steps, such as selecting a file, and you can correctly record the Camera Raw Selected Image setting.Click the "Create new action" icon in the Actions palette, enter the name"Save as JPEG"in the ensuing dialog box, and then click Record to dismiss the dialog and start recording the action. Recording the Open stepThe first step is to open the image in Camera Raw, so that you can include the correct Camera Raw settings in the action. When you use the action in Batch, the Camera Raw dialog box won't appear, so it's essential to get these settings right when you record this step. Open the image by pressing Command-O (you must open the image in Camera Raw hosted by Photoshop), and the Camera Raw dialog box appearssee Figure 9-3. Figure 9-3. Recording the Open stepWhen you record an Open step, it's critical to make sure that the Settings menu is set to Image Settings and the workflow settings are set the way you want them for the batch operation.[View full size image]![]() Then click OK to open the image. (If the Profile Mismatch warning appears, click OK to dismiss it. This doesn't get recorded in the action, and you'll suppress the warning when you use the action in Batch.) The image opens, and the Open step appears on the Actions palette. Recording the Save stepTo record the Save step, choose Save As from the File menu, or press Command-Shift-S. The Save As dialog box appears. The filename and the destination for saving that you enter here has no impact on the batch processI always enter an obviously silly name such as "foo.jpg" (I'm too lazy to type "throwmeaway.jpg") and choose the Desktop as my destination, to simplify cleanup. See Figure 9-4. Figure 9-4. Recording the Save stepWhen you apply the action in a batch operation, the filename and destination will be overridden, but the format options will be applied.![]() ![]() Stop and SaveClick the Stop button in the Actions palette to stop recording. Photoshop doesn't allow you to save individual actions, only action sets; so if you want to save an action as soon as you've written it, you need to select the action set that contains it in the Actions palette and then choose Save Actions from the Actions palette menusee Figure 9-5. Figure 9-5. Saving the action set![]() Figure 9-6. Save as JPEG action![]() VariantsYou can create variants of this action by recording different Open or Save steps. For example, you can create larger JPEGs by changing the Size setting in the Camera Raw dialog box to one of the larger sizes, and you can embed thumbnails or create lower-quality JPEGs by making those settings in the Save As and JPEG Options dialog boxes, respectively. To save in a different format, with different options, just choose the desired format and options when you record the Save step. Complex ActionSave for EditThe following example is a more complex action that produces 16-bit/channel TIFFs with sharpening applied and adjustment layers set up ready for final editing in Photoshop. It's designed for use on "hero" images that merit individual manual edits in Photoshop. It doesn't actually do any of the editing, because the required edits will almost certainly be different for each image in a batch. Instead, it simply does a lot of the repetitive grunt work involved in setting up an image for editing, so that when you open the image, all the necessary adjustment layers are already there, waiting for you to tweak them. Creating a new actionRecord this action in the same set as the previous one, since it's also designed for raw processing. As before, select a raw image that has had custom Camera Raw settings applied before you start recording the new action. Then click the "Create new action" icon in the Actions palette, enter the name "Save for Edit" in the New Action dialog box, and then click Record to start recording. Recording the Open stepAs before, start by launching Camera Raw by double-clicking the selected image. In the Camera Raw dialog box, again make sure that Settings is set to Selected Image. This time, though, you'll make some different workflow settings.In the Space menu, choose ProPhoto RGB, my preferred working space.Set the Depth menu to 16/bit channel, because you'll want to make the edits in Photoshop in 16-bit/channel mode.Set the Size menu to the camera's native resolution.Enter 240 pixels per inch in the Resolution field, because you'll almost certainly check your edits by printing to an inkjet printer at 240 ppi. Then click OK to open the image. The image opens, and the Open step appears on the Actions palette. Adding the editsThis action adds four different editing layers (actually, three layers and one layer set) to the image before saving and closing. First, add sharpening layers using your sharpening tool of choice (mine is PhotoKit Sharpener from Pixel Genius LLC). Then add a Levels adjustment layer, a Curves adjustment layer, and a Hue/Saturation adjustment layer, as follows.I apply sharpening by choosing PhotoKit Capture Sharpener Expert from Photoshop's File>Automate menu, selecting Digital High-Res Sharpen, Medium Edge Sharpen, and clicking OK. You can substitute your own sharpening routine here, or you can elect to defer sharpening until you've edited the image in Photoshop.Add a Levels adjustment layer by opening the Layers palette's Adjustment Layers menu, choosing Levels, and then clicking OK to create a Levels adjustment layer that does not as yet apply any adjustments. You'll make the adjustments on an image-by-image basis in Photoshopthe action just does the grunt work of creating the layers.There's one small issue. PhotoKit Sharpener produces an open (expanded) layer set, and the Levels layer gets created inside the set. There's no way to record closing or expanding a layer set, so you need to record a step that moves the Levels layer to the top of the stack, using the shortcut for Layer>Arrange>Bring to Front (Command-Shift-]).Add two more adjustment layersa Curves layer, then a Hue/Saturation layerin both cases simply clicking OK when the respective adjustment dialog boxes, Curves and Hue/Saturation, appear. These layers are automatically created in the correct positions in the stack, so you don't need to employ any more layer-moving trickerysee Figure 9-7. Figure 9-7. Adding adjustment layersThe Layers palette![]() The Actions palette![]() When you open the resulting images in Photoshop, you can start editing immediately by double-clicking the adjustment icon in each adjustment layer without having to do the work of creating them first. If you don't need all the adjustment layers, you can easily throw the unused ones away. All the edits will be performed in 16-bit/channel mode for the best quality. Recording the Save stepRecord the Save by choosing Save As from the File menu. Again, name the file "foo" and save it on the Desktop for easy disposal. This time, choose TIFF as the format, make sure that the Layers and Embed Color Profile checkboxes are checked (creating untagged ProPhoto RGB files is a Very Bad Idea). Then click Save to advance to the Tiff Options dialog box.In the TIFF Options dialog box, choose ZIP for both Image Compression and Layer Compression, and then click OK to complete the savesee Figure 9-8. Figure 9-8. Save as TIFF![]() ![]() Figure 9-9. Save for Edit action![]() |