You are on page 1of 7

Intermediate &

Advanced
Actions
With Ben Willmore
Intermediate/Advanced Actions

This session is going to go beyond the basics with


creating Actions in Photoshop. This will include
batch-processing, setting specifications (such as
dimensions) and using conditionals.
The first action we’re going to create is for resizing
images for the iPhone where it treats a vertical image
differently than a horizontal. I’ve noticed that the iP-
hone will automatically scale my images up to fill the
screen when the aspect ratio of the image is close,
but not exactly the same as the iPhone screen. That
causes elements near the edge of the image to get
cut off. To solve that problem, I created an action that
scales my images to the exact size of the screen and
Ben Willmore adds black space on the sides if it doesn’t conform
to the aspect ratio of the iPhone Screen. Here’s the
Ben Willmore is a member of the Photo- steps I use:
shop Hall of Fame who has taught over
100,000 Photoshop users on five conti-
nents. His bestselling books, DVDs, and hit
Conditionals
seminars have established Ben as one of Note: Conditionals are a feature that is only accessi-
America’s favorite Photoshop instructors, ble in Photoshop 13.1, which is available through the
and he is often the top-selling speaker
Creative Cloud.
at design and photography conferences
throughout the world. He writes for numer- You can apply a condition to an action, as long as the
ous digital imaging publications, includ- “Conditional” is located in the same Actions folder as
ing Photoshop User magazine, and his the actions you’re going to reference. For example,
award-winning books have helped helped
you can tell Photoshop to apply a “Horizontal resize
hundreds of thousands of design and pho-
tography professionals make the transition for iPhone” to the image, UNLESS the image is ver-
from blindly following step-by-step tech- tical. In that case, use the “Vertical resize” instead.
niques to “Ah-ha! I finally GET Photoshop!” Essentially, you’re making Photoshop smart in that it
Website: http://www.digitalmastery.com will to do different things to different types of images.
Twitter: whereisben
Facebook: https://www.facebook.com/pag-
es/Ben-Willmore/63458096135

Navigating to Window > Actions will load the Actions


panel if it’s not already loaded.
First, click on the New Action icon at the bottom of
your Actions panel (It looks like a square piece of pa-
per with the corner folded down), and give your new
action a name, “Horizontal iPhone,” for example. Pho-
toshop will now start recording all your commands.
Then, go to the File>Automate>Fit Image and enter
Creating Actions

the iPhone 5’s screen resolution for a horizontal orientation (1136x640). Tips & Notes
That will scale your image so that it is no larger than the dimensions you
entered. If your image is from a 35mm DSLR camera, then the result will
be a 960x640 image. To add black space around the image, choose Im-
age>Canvas size, set the width to 1136 pixels. The dialog box will want
to know what to do with the new, empty space, so you should select
“Black” from the dropdown menu at the bottom of the dialog box. Then
hit Stop on the actions panel so it stops recording.
Photoshop will usually only record the changes you’ve made in a dialog
box. If you leave any setting unchanged, then it will use whatever the de-
fault setting is for that field. In this case, that means that the height would
reflect the height of the image that the action is being applied to. If you’d
like to make sure that the height is always 1136, even if the image that
action is being applied to does not match that value, then you can click
on the Height field (which would already be at the value you desire), now
press the up arrow key and then the down arrow key. That will get you
to the same value you had in that field a moment ago, but will cause the
number to be recorded in the action because Photoshop will think that
you made a change (even though you ended up with the same value that
you started with).
Now let’s create an action named Vertical iPhone that is designed
to resize vertical images by creating one with the following steps: 1)
File>Automate>Fit Image, set the width to 640 and the height to 1136. 2)
Image>Canvas Size, set the width to 1136 and the height to 640.
Finally, let’s create an action that chooses between the two actions we
just finished creating based on the orientation of the image. Create a
new action called something like Resize for iPhone. This action will have
a single step. Choose Insert Conditional from the side menu on the ac-
tions panel, set the If Current pop-up menu to Document is Landscape,
then set the Then Play Action pop-up menu to Horizontal iPhone and the
Else Play action pop-up menu to Vertical iPhone. That will cause Photo-
shop to play the first action if the image has a horizontal orientation and
the other action if it’s vertical. Remember, the Insert Conditional com-
mand is only available in Photoshop 13.1.

Batch Processing
Let’s look at how you can apply an action to dozens of images with a
single step in Bridge.
From Bridge, select all the images you want to change, then select Tools
> Photoshop > Image Processor. The Image Processor Dialog Box
appears and at the very bottom, you can choose your pre-defined Pho-
toshop Action you want to apply and this will run all your selected photos
through that action and put them in a new folder based on the file format
Creating Actions

you chose. If you chose jpeg, the folder will be titled JPEG. Just leave Tips & Notes
the width and height settings blank if your action is designed to resize
your images.

Applying Texture with an Action


First, open Photoshop and open the image you’d like to apply the texture
to. In Photoshop, create a new Action. The first thing you want to do is
go to File > Open and open any file that contains a texture. Next, choose
Select>Select All and choose Edit>Copy. Now close the texture file, and
your original image should be showing in Photoshop. Choose Edit >
Paste to paste the texture on top of your image. Now you can choose
a blending mode from the layers panel (Overlay possibly) to blend the
texture into the image. Then you can hit Stop on the Actions panel.
It’s important to know that you can run into a problem with this kind of
action when you try to send the action to someone else to use on their
computer. The problem occurs when Photoshop follows the path (on
your computer) to an opened image. That means the action will include
the name of the hard drive and name of the user who is logged into the
computer. This will obviously only work on the computer the action was
created on.
To get around this issue, you need to use an “Insert Stop” command,
which can be found in the top right dropdown menu of the Actions panel.
Insert Stop will allow you to leave a message for the user of the action,
prompting them to open a texture file on their own computer. Then you
can turn off the checkbox icon for the step that opened the texture file so
that the user is forced to open their own file.
If, after creating the action, you decide that you don’t need the stop
when you apply the action (since you created the action and therefor the
path to the texture file is valid for your machine), then turn off the check-
box next to the Stop step in the action to skip that step and turn on the
checkbox next to the step that opened the texture.

Subroutines
A subroutine allows you to apply an action within an action. This can
make your actions much more versatile. A subroutine is a little chunk of
steps that I’ll use over and over again inside my actions.
To create a subroutine, start off with a document that contains two layer
and have the top layer active. Create a new action, for example “Only
Adjust Highlights.” Now, click on the “fx” icon at the bottom of the layers
panel and choose Blending Options. Move the lower left slider under the
Blend If heading and then hold Option (Mac), or Alt (Win) and drag the
slider again to split it in half. That will cause the dark areas of the under-
lying image to not be affected by the active layer. Finally, click the stop
Creating & Editing Actions

button at the bottom of the actions panel to finish the action. Tips & Notes
Now, to use that subroutine within another action, create a new Action
(Example: Warm the highlights) and then use an Adjustment layer to
warm the highlights. Use whatever Adjustment you’re comfortable with
for this. Now, to insert your Subroutine, hold the command key (Mac),
or Ctrl key (Win) and then click on the name of the subroutine which will
add that action within the action you are creating. Click the stop button at
the bottom of the actions panel to finish the action.
A great thing about subroutines is that you can have a bunch of actions
that all refer to a single subroutine. If you ever want to change that sub-
routine, all the actions that use it will then be updated to incorporate the
new instructions.

Things to watch out for:


There are a handful of things you can do that will essentially mess up
your action. Take a note of those here:
• If your action uses a feature that only works in RGB mode, but the ac-
tion might be applied to a grayscale image. Then try using the File>Auto-
mate>Conditional Mode Change feature to force images to be converted
to RGB mode.
• If your images were different sizes. You can get around this one by
changing your rulers to percentages when creating the action.
• What type of layer might be active and if that will mess up the action:
Type layer, empty layer, hidden layer, etc.
• Clicking on the name of a layer to change which layer is active will re-
cord the name of the layer in the action. That can cause problems if you
record the action with a document that has a Background layer, but later
try to apply the action to a document that does not have a layer of that
name. To get around that problem, change layers using your keyboard
by holding the Option key (mac), or Alt key (win) and pressing the brack-
et keys ] or [ to switch which layer is active. If you use the Command key
(Mac), or Ctrl key (Win) instead, you should end up moving the active
layer up or down in the layers stack.
• Switching between documents by clicking on the tab for another docu-
ment will record the name of that document within the action. If you’d like
to switch layers regardless of name, then hold the Control key and press
Tab. Add the Shift key to reverse the order you are cycling through the
documents.
Editing & Troubleshooting Actions

• If you need to record paint strokes in an action, be sure to choose Allow Tips & Notes
Tool Recording from the side menu of the Actions panel before you start
to record your action. That feature is new to Photoshop CS6. If you have
a previous version, here is a workaround: 1) Create a path using the
pen tool. 2) Choose Insert Work Path from the side menu of the actions
panel. 3) Switch to the painting or retouching tool you desire. 4) Choose
Stroke Path from the side menu of the Path panel. Note: Photoshop CS6
will automatically include the creation of paths in an action. That was not
true in previous versions, which is why you had to use the Insert Work
Path command to get the path into your action.
• If you need to create a new layer on top of the layers stack regardless
of how many layers are in a document and regardless of which layer is
active, then choose Select>All Layers before you create the new layer.
• If you’re going to fill an area or paint, decide if you’d like to include
changing your foreground color within the action so that the color will
always be the same, or if you’d like to skip that step so the action will be
different depending on what the foreground color is at the time the action
is applied.
• If your action will include more than 20 steps, then consider opening
the History panel and adding a snapshot at the beginning of your action
so that the user will able to get back to what the image looked like before
the action was applied. Photoshop defaults to 20 history steps, so if your
action has less than that, then there is no need for the snapshot.
A good practice is to create a folder of test images that may have some
of the above qualities and then test out your actions on them to see if
they mess up. If they do mess up, then you know to try to create a sub-
routine to get around the problem.
Workarounds
The are some features that actions are incapable of recording, or are
recorded in a way that is not useful. Here are a few examples of how I’ve
worked around those limitations:
• I needed to create a three inch wide selection on the left edge of a doc-
ument regardless of the document’s original size. I first tried setting the
Marquee tool to a width of “3 in” and a height of the whatever the maxi-
mum was. I just entered “9999999 in” into the height field, which prompt-
ed Photoshop to change it to the maximum setting possible, which was
1250 inches. The problem came when I used the Marquee tool to create
the action on a document that was only 4” high. The step in the action
was not 3x1250 inches, but instead 3x4 inches! To get around that, I
stopped the action, created a new file that was at least 3x1250 inches in
size, started recording the action again and made the selection, so that it
was recorded as 3x1250 inches. I then stopped the action and switched
Batch Processing with Actions

back to the original image I was working with to continue to record the action. When I play the action back, it
always creates a selection that is 3” wide by whatever the height of the active document is.
• I needed to create a 3” wide selection on the right edge of an image regardless of what size the action
might be applied to. If I set my rulers to inches, then it recorded the position of the selection as how many
inches it should be from the left edge of the document. If I set the rulers to percentages, then it recorded
both the position and width of the selection in percentages, which didn’t always produce a 3” wide selection.
To solve this problem, I had my rulers set to inches, made the selection along the left edge of the document
so that it recorded it as zero inches from the left edge. I then typed Q to turn on QuickMask mode, choose
Image>Transform>Flip Horizontal and then typed Q to turn off QuickMask mode, which moved the selection
to the right edge of the document.
I don’t expect that you’ll actually need to do what was mentioned above. I only include it to give you an idea
of how creative you will sometimes need to become when creating an action that is designed to work on all
sizes of images.

Bonus Tip
After creating an action, choose File>Automate>Create Droplet and save it to your desktop. Next, switch
to Adobe Lightroom and choose File>Export. In the Post-Processing section of the settings, choose Go To
Export Actions Folder Now from the After Export pop-up menu. When the resulting folder appears, drag your
newly created droplet into the folder. Once you return to Lightroom you should find your action available in
the After Export pop-up menu. Creating an export preset that includes an action as we just did (save the pre-
set by clicking the Add button in the lower left) will cause Lightroom to automatically open your exported im-
age into Photoshop and apply the chosen action after the image has been exported from Lightroom. That’s
a really nice way to quickly apply a border effect or other technique that is not otherwise possible using the
features found in Lightroom

You might also like