Creating an Action That Makes Decisions for You


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.

Step One

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.

Turbo Boost

Actions tend to rely on previous steps. Therefore, deselecting or removing a step will likely break the action.


Step Two

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.

Step Three

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.

Step Four

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.

Turbo Boost

If you insert a Stop into an action without turning on the Allow Continue checkbox, many users may not know to press the Play Selection icon to resume the action. Be sure to add a little message informing them to press Play Selection to continue.


Step Five

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.

Step Six

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.

Step Seven

Now, you're done recording so just click the Stop Recording icon at the bottom of the Actions palette.

Turbo Boost

Here's a tip worth its weight in gold. When you're targeting various layers in an action, make sure you use the commands under Layer>Arrange to move layers. If you don't, your action may fail when used on another file.


Step Eight

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.

Step Nine

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.

Step Ten

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.

Turbo Boost

When looking at actions in Button mode, check out the various colors of each action. Type-related actions tend to be green and image effects tend to be orange. You'll save yourself and others time if you follow these standards.


Step Eleven

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.

Step Twelve

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.

You can't use ImageReady actions in Photoshop, so you'll need to run any batch processing tasks here in ImageReady. However, Photoshop's Batch feature is equally as powerful and Chapter 4 is devoted to it entirely.


Turbo Boost

One thing you'll need to keep reminding yourself is that Adobe Bridge is not the Photoshop File Browser. In fact, you can open multiple Bridge windows by choosing File>New Window or by pressing Command-N (PC: Control-N).




Photoshop CS2 Speed Clinic
The Photoshop CS2 Speed Clinic: Automating Photoshop to Get Twice the Work Done in Half the Time
ISBN: 0321441656
EAN: 2147483647
Year: 2006
Pages: 113

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net