27 October 2006

Photoshop Action and Batch to resize images

Jingye says: 'I am scratching my head on Photoshop tasks'. I am not a pro (digital) photographer. With busy life, I just want to get some reasonable quality picture from my digital cameras. I took many many photos during holidays (easliy over 5Gb for two weeks in a exotic country). I only have time to tidy them up a little bit, mostly an auto-leveling and an auto-curving. Then I will print some, upload a small size to flickr; archive a large version.

Many ps tasks I have done in the pass were forgotten fast. So here I steal/rewrite from other people’s Photoshop tips/how to do something. I claim not rights of them unless stated. This is just my web notepad for myself and everyone else.’

Using Photoshop Actions and batch command to resize images.

Rewrite and proved based on tsion (http://www.sitepoint.com/forums/showthread.php?t=252128 Apr 10, 2005, 10:38’s tutorial)

Objective: Create a custom action and use Photoshop’s batch command to process a group of images to a certain size.
Applicable versions: Photoshop CS (v8) and Photoshop v7
Prep work: Resize will based on a certain axis, i.e. width/height. To maintain a consistent size of a collection of photos, it is better to 1) group landscape and portrait photos in two source folder (i.e. source_landscape, source_portrait) 2) create two actions: e.g. ‘resize to width 800’ ‘resize to height 800’.
Create an ‘output’ folder as well.

In the following walk though we will do ‘resize to width 800’ only, same principle apples to ‘resize to height 800’.

1) Copy all landscape images you want to resize to the “source_landscape” folder.
When you copy your images, I recommend you copy them all to the root directory in the “original” folder, don’t use any subfolders. This you’ll ensure that you have no duplicate images, or images with the same filename.

Now we record custom automation action.

2) In Photoshop, open an arbitrary image.
3) Now, create a new action set. To do this, we click on the folder icon in the Actions panel. Let’s name this set “Custom”. I like to keep my custom actions in their own set, so I can find them easier later on.
4) Next create a new action. Click the “create new action” icon in the Actions panel.
5) Name this Action “resize to width 800” As soon as you create a new Action, your action starts recording.
6) To resize the image: Go to IMAGE --> RESIZE IMAGE. This will open the “Image Size” dialog box. Now let’s change the width of our image to 800 pixels wide. Then click “OK”.
7) Now immediately after you click “OK”. Go to FILE --> SAVE FOR WEB. Set your jpg parameters how you normally would and click save.
Due to a bug in cs, there are two things described here must be follow:
7.1 Make sure you save this file in the “output” folder that we created in prep work.
7.2 DO NOT rename the file, just save it as it is. Otherwise you will get ‘Replace Files’ message window in batch process later for each image. (more below)

8) Click the “Stop recording” icon in the Actions panel. Our new Action is complete, and ready to use.
Now we are ready to process our images.

9) Go to “output” folder and delete the image you saved there when you created your action. This is just so it doesn’t get mixed in with the images you’re processing.

10) In Photoshop, go to FILE --> AUTOMATE --> BATCH.

11) The “Play” section. Change your set to “Custom”. And your Action to ““resize to width 800” this sets the Action you created earlier.

12) The “Source” Section. Since we did not create an “Open” Command in our Action, we need to make sure the “Override Action “Open” Commands” is NOT checked. The “Include Subfolders” option doesn’t matter. The “Suppress file Open Options Dialog” should be checked. And the “Suppress Color Profile Warnings” should be checked.

13) Click the “Choose” button and select the folder "source_landscape" you created in prep-work.

14) The “Destination” Section. The “Destination” should be set to “Folder”. Click on the “Choose” button and select the folder you created called “output”. Make sure the “Override Action “Save As” command” is checked. Otherwise batch will create two identical files for each image – one named after original name (this is what action records in ‘save for web’) and the other name after the following pattern.

15) In the “File Naming” Section. I prefer to prefix original image file name with something like ‘forWeb_’ just to differential it from original file. To do this Set the first box to ‘forWeb_’ second box to “Document Name” and the third box to “Extension”.

Now, to process your images, just click “Ok”.
And that’s it.

Question 1: When I run the batch command, PCS brings up the replace image dialogue asking me is I want to replace the previously saved image, which obviously I don't.
What am I missing?

Answer: First, the output folder in ‘resize to width 800’ action must be identical to what it is set in batch process output folder.
Second, Do not rename the file in recording the action, this seemed like confused the batch process.

Question 2: 'm trying to batch process ..alot of images...but everytime i run the batch, the picture quality appears after each image, asking me to save at what size. This is alot to go thorugh when i have thousands of pics, is there a way around this? So far from what i've seen, the answer is no.

Answer: use ‘Save for web’, not ‘save as’