I think the way Photoshop names this feature doesn't really do it justice. Photoshop calls this a "conditional" action, which sounds too much like a techie term. Why not call it what it does? It makes a decision for you. This only works in ImageReady, so if you're someone other than a Web designer, there's a chance you may never have even opened ImageReady. The cool thing is that you don't need to be a Web designer to take advantage of ImageReady's features. You can do a lot of the same things using its Actions features.
Why Use a Conditional Action?
Let's say someone hands you a CD with hundreds of photos of all types and sizes that need to be put onto a Web gallery or catalog site. Some are already small and can be put onto the site, while some are too large and must be resized. So, you decide to write an action that sizes (using Image Size) the large photos down to 640x480 at the most. However, if you run the action on all of the photos on the CD and some of those photos are smaller than 640x480, those images will be enlarged since the Image Size change will run on every file, and you don't want that. So, what's left? Do you go through the images and pick out all the ones that are already small? Nope, just open ImageReady and create a conditional action.
First off, we need to open ImageReady. If you've already got Photoshop open, it's easy: just click the Edit in ImageReady icon at the bottom of the Toolbox or press Command-Shift-M (PC: Control-Shift-M). ImageReady will launch and as soon as it does, open any photo to use for recording an action.
To display the Actions palette in ImageReady just choose Window>Actions. The palette works very similar to the way the Actions palette does in Photoshop, so just click the Create New Action icon at the bottom right of the palette to start recording an action. Name the Action "Web Gallery Resize," leave the Function Key field at None, and click Record.
To resize this image choose Image>Image Size. In the Image Size dialog, enter 640 pixels for the Width settingor whatever maximum width that you want for your images. Also, turn on the Action Options checkbox at the bottom of the dialog and choose Width for the Fit Image By setting. Click OK.
Now, we need to make sure the height of the image doesn't exceed 480 pixels, so choose Image>Image Size again. This time set the Height to 480 pixels. Again, turn on the Action Options checkbox, and this time select Height for the Fit Image By setting. Click OK.
Next, let's save this image for the Web. Since these are all going to be photos, let's save them as JPEG files. Go to the Optimize paletteit should be nested with the Info palette. If you don't see the palette, go to Window>Optimize to open it. From the Preset pop-up menu, select JPEG Medium so the file sizes aren't too big.
Then choose File>Save Optimized As. Keep in mind that this is just a dummy file and it doesn't really matter where we save this image. If it's one of your original files you may want to make sure that you don't overwrite the original.
Now, you're done recording so just click the Stop Recording icon at the bottom of the Actions palette.
It's time to insert the conditional steps into the action to help make decisions for us. At the bottom of the Actions palette, click the Insert a Step icon (it's the one on the left) and choose Insert Conditional from the pop-up menu.
In the Conditional dialog, in the If the Following Condition Is Met section, choose Image Width from the first pop-up menu. Choose Is Greater Than from the second pop-up menu and enter 640 in the field to the right. (Remember, that is the maximum width that we want for our images.) In the Perform the Following Action section, choose Include from the pop-up menu and enter 1 step. Click OK.
This will add another step to the end of your action. To make it work correctly, we want it above the first Resize Image step, so just click-and-drag it there now.
Now, repeat Step Nine but this time, from the first pop-up menu in the If the Following Condition Is Met section, choose Image Height. Also, enter 480 (the maximum height that we want for our images) in the field to the right of the second pop-up menu. Leave all other fields with the settings we chose earlier and click OK. Once again, this will add the step to the wrong part of the action, so just click-and-drag it above the second Resize Image step but below the first one.
That's it. The Conditional action is now recorded and it'll make the decisions for you. You can try it out on individual images but, honestly, the real power comes from using it in a droplet or batch process. Check out the tutorial on page 143 to see how to turn this into a droplet (a little program that will allow you to apply this action to an entire folder of images) and check out Chapter 4 to learn all about batch processing.