Photoshop: Batch / Image Processing and Scripts
In this lengthy tutorial, I will present some time-saving and useful tools in Photoshop. Ever found yourself doing repetive tasks, such as applying the same options to hundreds of images? Rather than doing such things manually, why not let the Batch Processing tool, or the Image Processor (CS2+) do the work for you? With a little bit of help of Action files, both these tools will save you an extreme amount of time doing such tasks.To end the tutorial, I will quickly introduce another slightly hidden function in Photoshop, the Scripts.
Batch Processing
To get started, I will record the following Action:- - Resize to 300px width.
- - Apply a curves adjustment layer.
- - Sharpen the image using Smart Sharpen.
- - Apply a 4px border around the image. ( select, contract, inverse, fill )
- - Save for Web with chosen settings.
- - Close Document.

Next step will be to go to File - Automate - Batch.

This will bring up a big window with plenty of options to choose from.
- Set - Choose the action set you would like to use.
- Action - Choose an action from the selected set.
- Source - The source to be altered. Choose a folder, import from a camera, or just alter the currently opened files.
- Override Action "Open" Commands - When this option is on, source files will be opened from the source folder only by open steps in the action. If there are no open steps, no files will be opened.
- Include All Subfolders - Alters the contents of the subfolders inside a selected folder.
- Supress File Open Options Dialogs - Doesn't show the file open dialog.
- Supress Color Profile Warnings - Doesn't show color profile warnings.
- Destination - Choose where your files will be saved to. Choose between none, save and close, and folder.
- Override Action "Save As" Commands - Overrides the "save as" action steps with the ones specified there.
- File Naming - Rename your files. An example of the renamed files is shown.
- Starting serial# - Starting value for serial numbers.
- Compatibility - Choose the compatibility for filenames. Choose between Windows, Mac OS and Unix.
- Errors - Useful function that lets you either stop the running batch process if errors are encountered, or log the errors to a file.
I selected the following options. Anything not mentioned was either unused or unchecked.
- Set - Tutorial
- Action - Resize & Alter
- Source - Folder ( i.e. Galleries/Tutorial/Many Clouds )
- Destination - None
- Errors - Stop For Errors
Since I already specified my destination in the Action file I recorded, I have no need to use the destination option. When specifying the destination in the action file, using that option doesn't work either way as it will still save where you first told it to.
However, if you did not specify a destination in the Action, using the destination option will work fine. It will prompt you to save though, if you are using the Save for Web option. Notice you can't use the renaming function with Save for Web.
When using Save As in your action, check the box for Override Action "Save As" Commands and you can use the renaming function without problems, and it won't prompt you for saving options.
Image Processing
The Image Processor is quite similiar to batch processing, although it's slightly different. Go to File - Scripts - Image Processor to open a window with a fair amount of options.
- Step 1 - Select the images to process. Use currently opened images, or choose a folder.
- Step 2 - Select the location to save the processed images. Save in the same location, or choose a folder.
- Step 3 - Select the file type to save as. Set the quality and choose between JPG, TIFF and PSD format. You can also resize the images.
- Step 4 - Choose if you'd like to apply an action or add copyright information.
Unfortunately, you can't use the Save for Web option, nor can you rename files. Being limited to only three file types makes this tool not a choice for me, but it might appeal to less advanced users, as it doesn't require Action files to do simple tasks.
Scripts
Scripts are similiar to Actions, but way more powerful. They can perform actions that involves multiple applications, or add conditional logic so that the script makes its own decisions based on the situation. Photoshop actually includes a few sample scripts that you can try located in the Adobe/Photoshop CS3/Scripting Guide/Sample Scripts (if you have a different version, the path may be different).To run a script, go to File - Scripts and choose either of the options. To load a saved script, choose Browse. Notice that it's possible to implement scripts inside Action files. Simply record a new action, load the script and press stop. Press play to perform the script, without having to load it via the file menu.
If you have no idea how to create your own scripts, there's the possibility of downloading some really nice ones. Trevor Morris offers several useful scripts, everything from closing all documents without saving, to hiding all layers. Further scripting resources includes Tranberry and Siva's Photoshop Conditional Action.