October 23, 2007

Automating Photoshop; Actions and Batching Explained

Filed under: Photoshop at 12:40 am —

If you work in Adobe Photoshop regularly, you’ll often find yourself engaged in repetitive loops that have a tendency to drain on your stamina and attention span. Today I’ll teach you how to use, and embrace the Action menu, a tool that will change the way you approach boring, monotonous tasks. Whether it’s mass resizing photos, embedding watermarks, adding filters, or perhaps something more or less complex, most of it can be automated.

First let’s open up the Actions menu and learn what it’s all about. It can be found under Window>Actions if it’s nowhere in sight on your workspace. It’ll look something like this:

Adobe Photoshop Actions

A: Actions menu. You can control a number options in this menu (a few are described below), and save an action file to your desktop or load a premade external one through it.
B: Action Set. All actions must reside within these groups.
C: Action & Recorded Commands. The action name is followed by the commands you recorded on it. In this case “Vintage” is the name of my action, and “Surface blur”, “Desaturate”, etc. are my recorded commands.
D: Dialog Box Toggle. If you have this checked on, it will bring up the dialog box for that command when you run the action. For example, if I have a group of commands and the only one that has dialog checked is “Make Text Layer”, then it will automate everything up until the text layer, and you’ll be able to enter your text. When you finish editing the text, the action set will automatically continue until the end.
E: Toggle Item. Similar to hiding a layer, when this is unchecked the command will not run with the action.
F: Playback Controls. The recording button is used to capture your commands into a new or existing action. The stop button will end the recording process. The play button will run an action or a command depending on what you have selected.
G: Create a new action set.
H: Create a new action.
I: Delete the item you have selected. It can be a command, action, or action set.

Now that you have a good idea of what’s what on the palette, it’s time to make your own. Open up the file you want to record your action on and start by creating a new action set. When you have a set ready, click the “Create new action” button, you’ll be presented with the following dialog box.

Adobe Photoshop Create New Action

Name your action and make sure it’s going into the desired set. You can set a hotkey & color for it if you want, which I’d recommend if it’s something you’ll be using often.

Click “Ok” and your new action will immediately begin recording. Have at it, every command you do from now until you press the “Stop” button will be recorded on your new action. Don’t worry about being totally perfect when recording, you can go back after it’s finished and delete certain things you screwed up and/or record more commands inside of the action.

Inserting a Stop
Sometimes you might want the action to stop at a certain point, or just present a warning box to the user with a continue button. Simply click on where you want the stop to happen (the command right before it, however you can move commands around just like layers if you need to), then click on the action menu (labeled “A” on the diagram above), and click “Insert Stop”. You’ll be presented with a dialog box where you can enter a message and specify whether or not you’d like the action to be continuable.

Opening a Photoshop Menu With Actions
Your action might need to launch an Adobe Photoshop menu (ie: the action will open Image>Canvas Size and won’t continue until the user enters the new size and presses Ok). To accomplish this, click on the action menu (labeled “A” above) and select “Insert Menu Item”. A dialog will launch, simply pick the menu you want to open from here (ie: go to Image>Canvas Size) and the dialog will show that it’s recorded your choice, click “Ok” and your menu action will appear on the list of commands.

Recording a Path
Sometimes your actions might need to record paths from things like the pen tool or adobe illustrator vectors. To insert them during or after recording, click on the paths tab (Windows>Paths), select the one you want and open the actions menu (once again, labeled “A” in the above figure), click “Insert Path”.

Batching Your Actions

When you have a number of photos that need to go through your new action (some good examples: watermarking, resizing/compressing, changing file extension), you should use Adobe Photoshop’s built in batch tool. You’ll find this under File>Automate>Batch. You’ll see the following dialog when you open this up.

Adobe Photoshop Batching

Pick the set and action you’d like to run and specify source of where your images are located. You’ve got the option of picking from a folder, import from an external device (like a scanner), or to run it on all the files you currently have open in Photoshop.

Once you’ve got your source appropriately specified, you can choose a destination for the finished files. Photoshop will let you either do nothing and leave the files open in Photoshop, Save & Close the files in their original location, or save the files to a new location with the option of renaming each of them based on the naming template you select.

Finally, you can choose to either stop the batch when you run into errors or log them to a file on your hard drive.

When every thing’s set, click “Ok” and watch the magic.

16 Comments »

  1. Wow, that sounds pretty useful. Would have saved me loads of time going through all my holiday photos and resizing them to a reasonable size, and changing the levels one by one.

    Nice tutorial.

    Comment by Ray — October 23, 2007 @ 8:16 am

  2. I can get it to work fine, but it keeps asking me about something for each file before saving. I want it to just do that “magic” while I sit back. I don’t want to have to hit save every time. Thanks for the post though.

    Comment by confused — October 23, 2007 @ 9:35 am

  3. CS version 7.0
    Would anyone know how to do the following, but first let me explain what I am doing (should be very common).

    I have a set of photos that I want to resize and save for the web. I created an Action where 1. I have the action open up the image size menu and 2. does the save for web. This works pretty well except for two things:

    1. It would be great for the image size action to be able to resize wider images to 8 inches in width and taller images to 4 inches in width. Right now I am simply resizing everything to 4 inches in width.

    2. The Action that I created has the destination built in as part of the export action. When I created the Action, upon the second step where I went to the file->save for web menu I simply clicked Save and proceeded to click on OK for the last step. The destination folder is built in. So basically, if the folder where the image was saved to no longer exists, when I run the Batch I get the message “Could not complete the Action, since the destination folder does not exist.”
    The thing here is that the destination folder option under the Batch window does not come into play when the export Action fires up.

    Is there anyone that has an answer to the following questions? Any help is greatly appreciated. I searched in google groups and other places and found question 2 asked in 2002 and 2004. Apparently there was only a workaround for this although I am not sure which version of PS this referred to. To solve this people mentioned the Batch rename Action. This means that you run your first Action set and then run the Batch rename Action. I cannot find the set where the Batch rename Action resides. Besides, with CS 7.0 this may have been fixed. Again any help on this is greatly appreciated.

    Comment by fullofquestions — October 23, 2007 @ 11:36 am

  4. I stumbled upon this new application, which seems to do batching quite well in a similar way without the bloat of photoshop. It is called Phatch, which means “PHoto & bATCH!” Moreover it is free, open source and runs on Windows, Mac and Linux. As it is quite new, it doesn’t have a big feature set yet. You can rotate, resize, apply rounded corners, shadows, watermarks, … It handles a wide range of image formats and even CMYK. This is the homepage:
    http://photobatch.stani.be

    It even has an installer for Ubuntu.

    Comment by Mark — October 23, 2007 @ 12:23 pm

  5. fullofquestions:
    Try using the pre-built web gallery
    (File > Automate > Web photo Gallery)

    You can constrain the resize to x wide and x tall so basically you say no image should be wider than 800px and no taller than 400px and then it does it’s thing automagically. Then you can go and grab the large images and thumbnails from the folders it has created and use them as you wish in your own app. Hope this helps

    Comment by phreq — October 23, 2007 @ 2:34 pm

  6. “I can get it to work fine, but it keeps asking me about something for each file before saving. I want it to just do that “magic” while I sit back. I don’t want to have to hit save every time. Thanks for the post though.”

    When you are recording your action, you need to save your file before stopping the recording, then it will do the same during your batch not asking you again.

    Comment by JDigital — October 23, 2007 @ 6:21 pm

  7. Next to actions and batching, one can also Script Photoshop (2nd paragraph after the image) :)

    Comment by Bramus! — October 24, 2007 @ 3:31 am

  8. [...] Automating Photoshop; Actions and Batching Explained » Meta Titan (tags: photoshop tutorial automating) [...]

    Pingback by links for 2007-10-24 « toonz — October 24, 2007 @ 7:26 pm

  9. You don’t have to hit save every time. You merely create that action (saving the file) in your action. Although I’m not sure how you go about saving each file automatically under a different name so that you can keep the original, unless of course you set the action so that it saves to a different folder. Hm, that would work. Never mind then.

    Comment by Chris Grooms — October 26, 2007 @ 11:19 am

  10. [...] unha acción (que saiba trátase dunha copia de evaluación da acción). Por si algu&eaute;n non sabe como se fai unha acción [...]

    Pingback by phts26102007 « phohp — October 26, 2007 @ 7:19 pm

  11. [...] Automating Photoshop; Actions and Batching Explained » Meta Titan [...]

    Pingback by Weekly Links at Lynn M. Wallenstein — October 28, 2007 @ 3:01 am

  12. [...] Automating Photoshop; Actions and Batching Explained If you work in Adobe Photoshop regularly, you’ll often find yourself engaged in repetitive loops that have a tendency to drain on your stamina and attention span. Today I’ll teach you how to use, and embrace the Action menu, a tool that will change the way you approach boring, monotonous tasks. Whether it’s mass resizing photos, embedding watermarks, adding filters, or perhaps something more or less complex, most of it can be automated. [...]

    Pingback by Sawse - Stir it Up! » Blog Archive » 5 Collections and Tutorials for Any Photoshopper — November 26, 2007 @ 4:11 am

  13. Help! My record buttons for my actions doen’t sho up. In the palette they are grey out. How do I get them to work again?

    Comment by Michele — May 4, 2008 @ 12:51 pm

  14. Nice Tutorial…..

    Comment by Akhya — August 1, 2008 @ 5:03 am

  15. Great tutorial. Save me from having to buy a book.

    Comment by Juan — October 30, 2008 @ 10:33 am

  16. [...] Automating Photoshop: Actions and Batching Explained [...]

    Pingback by gearhed.com » Blog Archive » 30+ Useful Resources for Improving Your Photoshop Efficiency — November 15, 2008 @ 12:41 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment