Automating Tasks
STEP 1: USING A PRE-DEFINED ACTION
Before we create our own action, first use one of the many predefined Actions that come with Photoshop 7. That way, you can understand exactly what you are doing when you get to Step 2. Plus, you’ll have an opportunity to see what Actions the inventive folks at Adobe created for you.
■ Choose File ➢ Open(Ctrl+O) to display the Opendialog box. Double-click the \03folder to open it and then click the iris1.tiffile to select it. Click Opento open the file.
■ If the Actionspalette is not showing, choose Window ➢ Actionsto display the palette. Click the Actionspalette menu button (the small tiny triangle in the upper-right corner of the dialog box) and select Clear All Actionsto start off with an empty palette. Click OKwhen asked:Delete all the actions?
Click the Actionspalette menu button once again. You should see at least six different sets of Actions at the bottom of the menu. At this time, click Frames.atn to load the Actions palette with actions for creating frames. The Actions palette should now look like the one shown in Figure 3.3.
■ The Drop Shadow Frameis a useful frame to use when creating images for Web galleries, so click the Drop Shadow Frameto make it the active action. If you click the triangle to the left of the Drop Shadow Frame, the action will open up and you can see each step it will take. At the bot- tom of the Actionspalette, you’ll find the Play Selectionicon — it is the triangle icon — click it to run the selected action. Your image should now have a drop shadow as shown in Figure 3.4. If you want to undo the Action, choose File ➢ Revert. You can also use the Snapshotfeature in the Historypalette, but we skip that approach for now, as Technique 4 covers it.
As you can see, actions are recorded sets of com-
own customized border to an image for use in a Web gallery. Creating such a border manually can require many steps and be rather time-consuming. So, check out how we can automate the entire process to get it done error-free and best of all — quickly.
■ Choose File ➢ Open(Ctrl+O) to display the Opendialog box. Double-click the \03folder to open it and then click the iris1.tiffile to select it. Click Opento open the file.
Automating Tasks
Our first step is to reduce the size of the image so that when it is framed, it fits within a 640 x 640 pixel square. Next, we add a black line around the photo; then hand-select a color from the image to use for a wider outside frame. Finally, we add a drop shadow by using the pre-defined action that we used in Step 1.
■ Set up the Actionspalette as you did earlier in Step 1. It should show only the Frames.atnaction set. Click the Actionspalette menu button and
.
which forces Widthto change to 388. Click OK to resize the image.
Chapter 1 Photoshop 7 Fundamentals
choose New Setto get the New Setdialog box. In the Namebox, type in 50 PS 7 Techniques. Click OKto create a new set. You should now see a new action set in the Actionspalette at the bottom of the palette as shown in Figure 3.5.
■ To create a new action for the custom frame, click the Create New Actionicon at the bottom of the Actionspalette to get the New Actiondialog box shown in Figure 3.6. Type in Frame for iris; then click Recordto begin recording your steps.
Having done the math, I know the image needs to be 582 pixels tall. Using 582, we can add on the extra space and frames and still end up with an image that fits inside a 640 x 640 pixel square. Or you can use the Fit Image command, which will resize an image so it fits within a given rectangle.
■ Reset color swatches to a black foreground and a white background by clicking the Reset Swatchesicon (D) that is at the bottom of the Toolspalette next to the foreground and back- ground colors. This sets the background color to white.
■ Choose Image ➢ Sizeto get the Image Size dialog box shown in Figure 3.7. First, make sure a check mark is in the box beside Constrain Proportionsand then set Heightto 582 pixels,
.
.
■ To add a 7-pixel white border around the image, choose Image ➢ Canvas Sizeto get the Canvas Sizedialog box shown in Figure 3.8. Set Widthto 402(388 + 14) pixels and set Heightto 596 (582 + 14) pixels; click OKto add white canvas.
You can also use the new-to-Photoshop 7.0 Relative check box in Canvas Size. Click on it and enter 14 pixels (7 × 2) for Widthand Heightand you get a 7-pixel border without having to do the math!
■ Choose Select ➢ Select All(Ctrl+A) to select the entire image.
■ Choose Edit ➢ Stroketo get the Strokedialog box shown in Figure 3.9. Set Widthto 2 pixelsto create a 2-pixel wide black border. Make sure that Locationis set to Insideand then click OK. You should now see a 2-pixel black line all around the image.
Automating Tasks
■ Now we add some more white canvas by again choosing Image ➢ Canvas Size. Set Widthto 446 pixelsand Heightto 640 pixelsto create a 22- pixel wide white border. Make sure to check Relative! Click OKto create extra canvas.
■ To create the outside border, choose Select ➢ Select All(Ctrl+A). Choose Edit ➢ Stroke. This time, we don’t want to use black for the line; instead, we want to pick a color from the image itself. Click inside the Color Boxin the Stroke dialog box and you get the color picker. Move the Color Pickerso that you can see the image, and then click inside the image to get the color that you want. Keep clicking until you find something that looks good as a border color. I chose a deep green color that has R,G, and Bvalues of21,85, and 17, respectively. Click OKon the Color Picker dialog box to close it. Then make sure that Width is set to 6 pixelsand click OKto apply the colored border.
■ Now we add a drop shadow so that it appears to float over a white Web page. We do this by simply adding the Drop Shadow Frameaction that we used in Step 1 to this action. Scroll up the Actions palette until you find the Drop Shadow Frame action. Click it to make it the active action, and then click the Playbutton at the bottom of the Actionspalette. Photoshop 7 then does all the necessary work to create a drop shadow. We have just now added one action to another action. If you look at the Layers palette, you’ll find that it has created a background layer filled with white. If your intention is to use this action to create frames and drop shadows on images that are to go on a Web page that is any color but white, you can modify this action to make the background layer be the same color as your Web page. This enables the image to appear as if it hovers over the page as the image blends seamlessly with the Web page background.