Not only is Adobe Photoshop a powerful hands-on image editing tool, it’s a very powerful hands-off image editing tool. Read on as we show you how to automate repetitive and routine tasks so you can spend your time more creatively, rather than cropping, correcting, and otherwise clicking.
Why Do I Want to Do This?
Early on in every amatuer and professional photographer’s pursuit of photography and digital editing they realize just how much time they’re spending dinking around in photo editing applications. Photoshop, and comparable tools, are truly the darkroom of the digital age where the modifications and finishing touches are applied to photos. Unlike the darkrooms of old, however, we have the power to automate parts of the process in a way that photographers of yesteryear could only dream of.
Let’s say, for example, you read our tutorial How to Fix Poor White Balance in Your Photos with Post Processing so you now know how to correct the color issues in your photos using Photoshop. Let’s say you have two hundred photos from a family get together that all need the same massaging. That’s an enormous amount of labor, especially when you consider that you’re just repeating the same actions over and over again on each image. Automating the process would allow you to perform the actions once and then have Photoshop repeat the process on every image.
This process is called creating an Action in Photoshop lingo and it’s, frankly, a vastly underused feature in Photoshop. Investing the time to create actions that cover many of your frequently repeated tasks in Photoshop can save you untold amounts of time both in the short and long term. In our previous example, correcting the color cast of the images, even if you could fix every image in 12 seconds, you would still need to sit at your computer furiously clicking and typing away for 40 minutes (assuming you were an absolute focus machine and didn’t waver even a moment from your work). A PS Action, by contrast, will tear through the pile of photos as fast as your computer will allow it. It will likely take less than five minutes for the same work and, even if the work is complex and takes hours to complete, it doesn’t matter because you don’t have to sit there.
Before we proceed, there is an important distinction to be made and one that we would like you to keep in mind when you’re thinking about what you’d like to automate and how you would like to do it. There are two key components to the automation process in Photoshop: Actions and Batching. Actions are essentially the recorded steps you would like Photoshop to repeat and can be executed on a single image at any time (e.g. you could make a simple action to crop a photo and add a drop shadow border in one click). Batching is the process of using the Batch function to repeat the selected Action on multiple images (e.g. to crop and drop shadow border 1,000 pictures in one session).
The reason we’re taking a moment to highlight the difference is so that you don’t feel like you should skip this tutorial because you’re not really planning on editing 1,000 photos at once. Actions just by themselves, without the muscle of the Batch function, are still amazing time savers. Even if you’re not making changes to tons of photos at one time, creating actions for your commonly repeated edits is still extremely useful.
Read on as we cover how to use both the Action and Batch functionality in Photoshop.
What Do I Need?
You’ll only need a few things for this tutorial. The most obvious of which is:
Beyond a copy of Adobe Photoshop (old or new doesn’t matter, Actions have been a part of Photoshop for ages) you’ll need a scratch folder with some images you would like to edit (or a folder to deposit newly created images in if you’re automating a from-scratch workflow).
Automating with Actions
Now that we’ve established why you want to do it and what you need, it’s time to get down to the business of actually automating the workflow itself. The best way to get a clean automation workflow is to go through the process one time, noting the necessary steps, so that you don’t waste any time fixing your automation process goofs during the actual recording stage.
For our automation workflow today, we’re going to have a little fun and create an Action script that can automatically generate cool bokeh-style wallpaper, a technique we shared with you in our tutorial How to Create Your Own Custom Bokeh Wallpaper in Photoshop. This workflow is particularly well suited for automation because the style of brush we use in the tutorial to paint the bokeh pattern, while not quite random, is highly variable. If we automate the process, we’re going to end up with a whole folder of cool backgrounds.
The first thing we need to do is record the creation process from start to finish. To get started let’s open up the Actions panel in Photoshop. You can do so by navigating to Window -> Actions or by pressing ALT+F9:
After you open the Actions window, you’ll see it on the right hand side of the screen with some of the default actions already available, like so:
Go ahead and grab the bottom of the window and pull it down, it’s easier to work with the Actions when you can see more of the pane. In addition, you’ll likely find it useful to create a unique folder just for your creations so they don’t get mixed in with the defaults. Go ahead and click the little folder icon on the bottom navigation bar and name your new folder (known as a “set” of actions).
While we’re talking about the icons in the navigation bar, let’s review all of them. Starting from left to right we have the Stop Recording, Record, Playback, New Set, New Action, and Delete button. The Stop, Record, Playback buttons work just like you’d imagine they would (and we’ll delve into them in just a moment). We just used the New Set button to create a folder to hold our new actions; now it’s time to use the New Action button to create our new Action.
Click it now and name the action something easy to recall (e.g. if you’re making a white balance correction workflow, name it WB Correction).
In addition to naming your new Action, you can even assign it a hot key for quick an easy access or a color code it so it stands out in the list. Once you’ve created the Action entry, it’s time to actually start recording the editing actions you want it to repeat. Remember, for this tutorial we’re going to use Actions to create a batch process for custom bokeh wallpaper. You can follow along with the general process with any actions you wish to repeat.
Note: Recording actual brush strokes (as opposed to global actions like resizing the canvas) is a feature new to Adobe Photoshop CS6 and not found in earlier versions. Thus, if you’re trying to follow along explicitly with our automated wallpaper painting process, you’ll need to have CS6 and you’ll need to click on the extended options menu in the Actions window and check off “Allow Tool Recording”.
Once you have everything set the way you want, hit “Record” to begin the process:
The recording button in the Action window will light up (you can click the stop button or hit ESC at any time to stop recording). At this point you want to begin the process you want to record. In our case we’re going to begin by creating the canvas for our Bokeh wallpaper. We’re not going to walk you through the entire Bokeh wallpaper tutorial here (you can check out each step of it in detail here).
It’s important to note that only the things you actually do will be recorded. The Action function won’t record you changing brushes or adjusting brush sizes, but when you actually put the brush to the canvas and move it around, it will record what happens. Our bokeh tutorial revolves around creating four layers (a background, and then three different layers of variable sized bokeh circles), and we’re going to turn right around and replicate that in our Action workflow.
You can see where we created the canvas, applied the gradient, made a new layer for the first bokeh layer, and the applied the brush and the blur. If at any point we had made a mistake and included an element we didn’t need, removing it would be as easy as clicking the Stop Recording button, and then dragging the no longer needed Action element to the trash. Furthermore, you can easily select an existing action and hit record, starting in the middle of the process without a problem.
There are two things worth noting if you’re creating an Action script you wish to batch later on. First, don’t include the creation of the canvas in the Action script (Photoshop will go into a weird loop where it will create blank canvases without saving your work). Second, notice the Save step at the very bottom of the list. For Action scripts you intend to execute in the middle of your workflow, you don’t need a save function. If you want to fully automate things, as we are about to do in the next section, you need to make saving the image the last step. This save dialog can be overridden in the actual Batch, but we’ve found that batched scripts behave more consistently when it is present.
At this point, we’ve recorded all the steps, start to finish, to create a bokeh wallpaper. We can now click on “Bokeh Wallpaper” in the Actions menu, under the set “HTG Tutorial” we created earlier, and press play to create a brand new no-interaction-needed wallpaper. This is a the complete Action we talked about earlier in the tutorial and a form of one-off automation.
What about repeating the process on multiple images (or in this case, creating multiple images), though? For that we need a Batch.
Automating with Batches
Batches are simply an extension of the Actions function in Photoshop wherein you apply an Action to a whole bunch of files. The Batch functionality is very powerful and can turn a whole pile of manual editing into a smoothly automated system that lets you put your feet up and read the paper while it finishes.
Compared to the work of setting up the actual Action itself, setting up a Batch is about as simple as can be. That said, there are a few basic rules to follow so you don’t end up frustrated or with a pile of overwritten files.
Since we can instruct the Batch command to rename the files, it’s actually much faster to just create one blank canvas, save it, make a bunch of copies in Windows, and then let Photoshop massage them and rename them. If we were correcting a bad color cast in a bunch of photos, for example, we could skip this creation step as we’d already have a folder chock full of source material to work with.
To start the Batch process, navigate to File -> Automate -> Batch:
When you click on “Batch…” you’ll be presented with a large menu like so:
It is here that you make the important decisions for your Batch process including: what your source folder is (or if you’re going to apply the Batch to the currently opened files), as well as your destination folder (or if you’re going to have the Batch overwrite the existing files). We strongly suggest creating an Output folder of some sort. Overwriting originals is always risky business, so unless your source folder is actually a copy of the original files and not the originals themselves, you should always opt to output to a secondary folder.
Finally you can choose to name your output files with various conventions. We opted to call ours Bokeh Wallpaper and serialize them starting with 001.
Time to let it rip and sit back as Photoshop does all the work for us. The Batch we are running is fairly intensive as it involves multiple layers, brush stroke recall, blurring, and then collapsing the whole thing down to save.
Even then, it ripped through 50 high resolution wallpapers for our triple monitor setup in 15 minutes and 38 seconds–all this on a machine where we left a good two dozen other apps open and kept on working on a different monitor. Not bad!
That’s it in a nutshell: you record your actions, you run them (either one-off while you’re working or in a giant batch while you’re doing something else) and you save a huge amount of time in the process. Everything from mass cropping to resizing to color correction becomes easy to automate, freeing you up for more creative work in the process.
Jason Fitzpatrick is warranty-voiding DIYer and all around geek. When he's not documenting mods and hacks he's doing his best to make sure a generation of college students graduate knowing they should put their pants on one leg at a time and go on to greatness, just like Bruce Dickinson. You can follow him on Google+ if you'd like.
- Published 07/8/13