Chapter 13

Automating Your Work

9781118643648-co1301.tif

Sometimes, you want to perform the same simple sequence of commands on many different images. With Photoshop’s Actions, you can automate repetitive imaging tasks by saving sequences of commands and applying them automatically to many image files. Other commands enable you to streamline your work by helping you create web photo galleries, picture packages, panoramas, and High Dynamic Range (HDR) images.

Record an Action

Play an Action

Batch Process by Using an Action

Create a Conditional Action

Create a PDF of Images

Create a Panoramic Image

Create an HDR Image

Convert File Types

Batch Rename Images

Using Tool Presets

Customize Keyboard Shortcuts and Menus

Load HTML and CSS Colors

Record an Action

You can record a sequence of commands as an action and then replay it on other image files. This can save you time when you have a task in Photoshop that you need to repeat.

You can create actions that apply filters and styles, paint colors, and save files in specific formats. You can string together multiple commands to create actions that generate complex effects. After you record an action, you can play it. See the next section, Play an Action, for more.

Record an Action

9781118643648-fg1301.eps

001 Click Window.

002 Click Actions.

The Actions panel opens.

003 Click a set in which to create your action.

Photoshop starts with a single set called Default Actions.

A You can click the New Set button (9781118643648-ma599.tif) to create a new actions set.

004 Click the Create New Action button (9781118643648-ma144.tif) to open the New Action dialog box.

005 Type a name for your action.

006 Click Record.

007 Perform the sequence of commands that you want to automate on your images.

9781118643648-fg1302.eps

B In this example, the first command, Auto Contrast, is performed by clicking Image and then Auto Contrast.

When automatically optimizing contrast, Photoshop performs a Levels adjustment.

Note: See Chapter 7 for more on adjusting colors and contrast.

9781118643648-fg1303.eps

C In this example, the second command is performed by clicking Image, Adjustments, and then Desaturate. This converts the image to black and white.

9781118643648-fg1304.eps

008 Click the Stop button (9781118643648-ma525.tif) to stop recording.

D The Actions panel lists the commands performed under the name of the action.

Play an Action

You can play an action from the Actions panel on an image. This saves time because you can execute multiple Photoshop commands with a single click. You can also play a specific command that is part of an action by itself. Photoshop comes with a variety of default actions already defined that you can apply to your image projects.

Actions that you record by using one image can be played on other images. See the previous section, Record an Action, for more.

Play an Action

Play a Full Action

9781118643648-fg1305.eps

001 Click Window.

002 Click Actions.

The Actions panel opens.

003 Click 9781118643648-ma095.tif (9781118643648-ma095.tif changes to 9781118643648-ma096.tif) to open an actions folder.

Note: To create your own action, see the previous section, Record an Action.

004 Click the action that you want to play.

005 Click the Play button (9781118643648-ma169.tif).

Photoshop applies the action’s commands to the image.

In this example, a sepia tone is applied to the image.

You can undo the multiple commands in an action by using the History panel.

Note: See the section Undo Commands in Chapter 2 for more on the History panel.

9781118643648-fg1306.tif

Play a Command in an Action

9781118643648-fg1307.eps

001 In the Actions panel, click 9781118643648-ma095.tif to reveal the commands that make up an action (9781118643648-ma095.tif changes to 9781118643648-ma096.tif).

002 Click the command that you want to execute.

You can shift.eps+click to select multiple sequential commands.

003 ctrl.eps+click 9781118643648-ma169.tif (cmd.eps+click 9781118643648-ma169.tif on a Mac).

Photoshop executes the selected command but not the commands before or after it.

In this example, the selected command adds the Find Edges filter to the image.

Note: To execute a specific command and all of those after it in an action, select the command and then click the Play button (9781118643648-ma169.tif) without pressing ctrl.eps (cmd.eps on a Mac).

9781118643648-fg1308.tif

Batch Process by Using an Action

You can apply an action to multiple images automatically with Photoshop’s Batch command. The command is a great timesaver for tasks such as optimizing large numbers of digital photos. You can also use the Batch command to apply the same special effect, such as adding a border or drop shadow, to a folder full of images.

To execute an action on a single image, see the previous section, Play an Action.

Batch Process by Using an Action

001 Place all the images you want to apply an action to in a source folder.

002 Create a destination folder in which to save your batch-processed files.

Note: To work with folders, see your operating system’s documentation.

9781118643648-fg1309.eps

003 In Photoshop, click File.

004 Click Automate.

005 Click Batch.

The Batch dialog box opens.

9781118643648-fg1310.eps

006 Click here (9781118643648-ma300.tif) to choose an action to apply.

007 Click Choose.

The Browse for Folder (Choose a Batch Folder on a Mac) dialog box opens.

008 In Windows, click 9781118643648-ma526.tif to open folders on your computer (9781118643648-ma526.tif changes to 9781118643648-ma527.tif).

On a Mac, navigate to your source folder.

009 Click the folder containing your images.

010 Click OK (Choose on a Mac).

9781118643648-fg1311.eps

011 Click here (9781118643648-ma300.tif) to choose Folder.

012 Click Choose and then repeat steps 8 to 10 to select the folder where you want your batch-processed files to be saved.

A You can specify a naming scheme for saving the batch-processed files.

013 Click OK (Choose on a Mac).

9781118643648-fg1312.eps

B Photoshop opens each image in the specified folder one at a time and applies the action.

If the action includes a save step, Photoshop automatically saves each image in the destination directory.

C If the action does not include a save step, Photoshop prompts you with a Save As dialog box for each image.

Create a Conditional Action

You can create a conditional action that executes other actions based on some criterion in your image. For example, if an image has a landscape orientation, you can apply a particular special effect. If the image does not meet the criterion — for example, it has a portrait orientation — you can apply a different effect or do nothing.

Photoshop comes with a variety of preset conditions to work with. You can check whether the image has a certain size, a color mode, or multiple layers.

Create a Conditional Action

Define the Conditional Action

001 Create the actions that you want to execute based on your conditions. See the section Record an Action for details about creating a custom action.

9781118643648-fg1313.eps

002 Click Window.

003 Click Actions.

The Actions panel opens.

004 Click the Create New Action button (9781118643648-ma144.tif).

The New Action dialog box opens.

005 Type a name for your action.

006 Click Record.

9781118643648-fg1314.eps

007 Click 9781118643648-ma517.tif to open the panel menu and click Insert Conditional.

The Conditional Action dialog box appears.

008 Click here (9781118643648-ma300.tif) to select a condition.

9781118643648-fg1315.eps

009 Click here (9781118643648-ma300.tif) to select an action to execute if the condition is met.

010 Click here (9781118643648-ma300.tif) to select an action to execute if the condition is not met. You can select None to do nothing.

011 Click OK.

012 In the Actions panel, click the Stop button (9781118643648-ma525.tif) to stop recording the action.

A The conditional step is added to the action.

Play a Conditional Action

001 Open an image.

9781118643648-fg1316.eps

002 Click Window.

003 Click Actions.

The Actions panel opens.

004 Select the conditional action.

005 Click the Play button (9781118643648-ma169.tif).

Photoshop executes the commands for the action.

B In this example, because the image has a landscape orientation, a frame effect is applied.

Create a PDF of Images

Photoshop can automatically create a PDF (Portable Document Format) file that shows one or more of your photos. You can select from two PDF types, Multi-Page Document and Presentation. The Presentation type displays your photos as a slide show in many PDF viewers.

Most computers come with a program for viewing PDF files. This makes the PDF format convenient for sharing digital content. If you need a program for viewing PDFs, you can download the free Adobe Reader here: http://get.adobe.com/reader.

Create a PDF of Images

9781118643648-fg1317.eps

001 Open the images you want to include in your PDF.

002 Click File.

003 Click Automate.

004 Click PDF Presentation.

The PDF Presentation dialog box appears.

9781118643648-fg1318.eps

005 Click Add Open Files (9781118643648-ma302.tif changes to 9781118643648-ma303.tif).

A list of the images appears.

A You can click Browse to save images from a folder on your computer.

006 Click a document type (9781118643648-ma007.tif changes to 9781118643648-ma008.tif).

007 Click here (9781118643648-ma300.tif) to specify a background color for space around your images.

008 Click these options to display text information with the images in your PDF (9781118643648-ma302.tif changes to 9781118643648-ma303.tif).

B If you save a Presentation document in step 6, you can choose slide show options.

009 Click Save.

The Save As dialog box appears.

9781118643648-fg1319.eps

010 Click here (9781118643648-ma300.tif) to choose a folder in which to save the PDF file.

011 Type a name for the PDF file.

Photoshop automatically assigns a .pdf extension if you do not specify an extension.

012 Click Save.

A Save Adobe PDF dialog box appears.

9781118643648-fg1320.eps

013 You can select additional PDF-related settings. See the tip for details.

014 Click Save PDF.

Photoshop saves the PDF.

Create a Panoramic Image

You can use the Photomerge feature in Photoshop to stitch several images together into a single panoramic image. This enables you to capture more scenery than is usually possible in a regular photograph.

Photoshop gives you stitching options to help ensure that your photos are combined appropriately. The final panoramic image can be relatively large. For tips on how to resize your image, see Chapter 3.

Create a Panoramic Image

9781118643648-fg1321.eps

001 Click File.

002 Click Automate.

003 Click Photomerge.

The Photomerge dialog box opens.

004 Click Auto (9781118643648-ma007.tif changes to 9781118643648-ma008.tif).

With the Auto setting, Photoshop automatically chooses the best method for stitching your photos together.

005 Click Browse.

The Open dialog box opens.

9781118643648-fg1322.eps

006 Click here (9781118643648-ma300.tif) to choose the folder that contains the images you want to merge.

007 ctrl.eps+click (cmd.eps+click on a Mac) the images you want to merge into a panoramic image.

008 Click OK.

9781118643648-fg1323.eps

A The filenames of the images appear in the Source Files list.

009 Click OK to build the panoramic image.

Photoshop merges the images into a single panoramic image.

B Parts of each image appear in separate layers in the Layers panel.

Note: For more on layers, see Chapter 8.

9781118643648-fg1324.eps

C You can use the Crop tool (9781118643648-ma024.tif) to remove extra space around the panorama.

Note: For more on cropping, see Chapter 3.

You can also fill in the space using the Content-Aware Fill feature. See Chapter 6 for more information.

010 Click File.

011 Click Save to save the panorama.

Create an HDR Image

An HDR image is a composite image created from several photographs of the same scene, with each photograph having a different exposure. Photoshop combines the best lighting from each image to produce a single optimized image.

HDR images are good for scenes that have both light areas and dark areas. With the HDR feature, you can have details in both areas stand out, instead of having dark areas too shadowy or light areas too bright. HDR stands for High Dynamic Range.

Create an HDR Image

9781118643648-fg1325.eps

001 Click File.

002 Click Automate.

003 Click Merge to HDR Pro.

The Merge to HDR Pro dialog box opens.

004 Click Browse.

The Open dialog box opens.

9781118643648-fg1326.eps

005 Click here (9781118643648-ma300.tif) to choose the folder that contains the images you want to merge.

006 ctrl.eps+click (cmd.eps+click on a Mac) the images you want to merge into an HDR image.

007 Click OK.

008 Click OK in the Merge to HDR Pro dialog box.

9781118643648-fg1327.eps

A Photoshop processes the images, merging their exposures and creating a single image.

009 Click here (9781118643648-ma300.tif) to choose the method by which Photoshop adjusts exposures.

In this example, Local Adaptation is chosen.

010 For the Local Adaptation and Exposure and Gamma methods, you can click and drag the sliders (9781118643648-ma054.tif) to fine-tune the lighting and colors.

011 Click OK.

Photoshop displays the HDR image.

9781118643648-fg1328.eps

B In this example, tones for the lighter part of the image are taken from the source image with the shorter exposure.

C The tones for the darker part of the image are taken from the source image with the longer exposure.

Convert File Types

You can quickly and easily convert images from one file type to another in Photoshop by using the Image Processor script. This makes it easy to convert a collection of TIFF files to the JPEG format for posting on the web.

The Image Processor script enables you to convert to the JPEG, PSD, and TIFF file formats only. Another option if you want to convert images to a different format, such as PNG, is to create an action that saves a file in that format and then apply the action as a batch. See the section Batch Process by Using an Action for details.

Convert File Types

001 Place the images that you want to convert into a folder.

Note: To work with folders, see your operating system’s documentation.

9781118643648-fg1329.eps

002 Click File.

003 Click Scripts.

004 Click Image Processor.

The Image Processor dialog box opens.

9781118643648-fg1330.eps

005 Click Select Folder.

The Choose Folder (Choose a Folder on a Mac) dialog box opens.

006 In Windows, click 9781118643648-ma526.tif to open folders on your computer (9781118643648-ma526.tif changes to 9781118643648-ma527.tif).

On a Mac, navigate to your source folder.

007 Click the folder containing your images.

008 Click OK.

9781118643648-fg1331.eps

009 Specify where you want your processed images to be saved (9781118643648-ma007.tif changes to 9781118643648-ma008.tif).

010 Click an image file type (9781118643648-ma302.tif changes to 9781118643648-ma303.tif).

A If you click Save as JPEG, you can also specify a quality setting from 1 to 12; the higher the quality setting, the larger the resulting file size.

You can click multiple format check boxes; Photoshop saves a separate image file for each format selected.

B You can click Resize to Fit (9781118643648-ma302.tif changes to 9781118643648-ma303.tif) and type a new width and height; Photoshop resizes the images before saving.

Note: Photoshop leaves the proportions of any resized images unchanged.

C You can click Run Action (9781118643648-ma302.tif changes to 9781118643648-ma303.tif) to have an action executed on each image before saving.

011 Click Run.

9781118643648-fg1332.eps

D Photoshop processes the images one at a time, saving them in the location specified in step 9.

Batch Rename Images

You can change the filenames of multiple images automatically with Bridge’s renaming feature. You can customize the new name by using custom text, the date, sequential numbers, and more. You can copy or move the image files at the same time that you rename them.

Renaming can be useful if you want to associate a large number of photos with a particular place, time, or person. Digital cameras typically name photos with incremental numbers, which is not very descriptive.

Batch Rename Images

001 Place the images that you want to rename into a folder.

002 In Photoshop, open Adobe Bridge by clicking File and then Browse in Bridge.

Note: For more on accessing Bridge, see Chapter 1.

9781118643648-fg1333.eps

003 Click the Folders tab.

004 Click the folder containing the images to rename.

005 ctrl.eps+click (cmd.eps+click on a Mac) to select the images you want to rename.

You can press ctrl.eps+a.eps (cmd.eps+a.eps on a Mac) to select all the images in the folder.

006 Click Tools.

007 Click Batch Rename.

The Batch Rename dialog box opens.

9781118643648-fg1334.eps

A By default, the renamed images are saved in the same folder.

9781118643648-fg1335.eps

B You can click Move or Copy (9781118643648-ma007.tif changes to 9781118643648-ma008.tif) to save the images elsewhere. After you click Move or Copy, you can click Browse to select a destination folder.

008 Click here (9781118643648-ma300.tif) to choose a file-naming option.

009 Type in the text fields or choose from menus to customize the filename.

In this example, the images are renamed with an all-caps version of their filenames.

9781118643648-fg1336.eps

010 Repeat steps 8 and 9 for other parts of the naming scheme.

C You can add or remove naming scheme options by clicking 9781118643648-ma146.tif or 9781118643648-ma145.tif, respectively.

D An example of the new filename appears here.

011 Click Rename.

Photoshop renames the images in the folder.

Using Tool Presets

You can specify commonly used options for a tool and then save that set of options for loading and using later. For example, it can be helpful to define presets for brush styles and opacities you use often.

Photoshop stores the presets in the Tool Presets panel. You can keep this panel open as you work to have easy access to useful versions of your editing tools.

Using Tool Presets

Define a Tool Preset

9781118643648-fg1337.eps

001 Click a tool.

002 On the Options bar, specify the settings you want to save for that tool.

003 Click here (9781118643648-ma009.tif).

A Previously defined and default presets are listed.

004 Click the Create New Tool Preset button (9781118643648-ma144.tif).

The New Tool Preset dialog box opens.

9781118643648-fg1338.eps

005 Type a name for the tool preset.

006 Click OK.

B Photoshop saves the tool preset and the preset appears in the list.

Load a Tool Preset

9781118643648-fg1339.eps

001 Click Window.

002 Click Tool Presets.

The Tool Presets panel opens, listing the presets available for that tool.

C You can click Current Tool Only (9781118643648-ma004.tif changes to 9781118643648-ma003.tif) to display the presets for all the tools.

9781118643648-fg1340.eps

003 Click a preset.

D The tool settings on the Options bar change to reflect those defined in the preset.

004 You can apply the tool to see the effects of the preset.

Customize Keyboard Shortcuts and Menus

You can assign keyboard shortcuts to Photoshop commands to streamline common tasks. Photoshop comes with many keyboard commands already assigned. For example, you can press ctrl.eps+o.eps (cmd.eps+o.eps on a Mac) to open an image. You can assign keyboard shortcuts to other commands if you find you use them often.

You can also hide menu items that you rarely use to reduce clutter in your workspace and make the commands you do use easier to find. Photoshop displays a Show All Menu Items command in menus that have commands hidden.

Customize Keyboard Shortcuts and Menus

Define a Keyboard Shortcut

9781118643648-fg1341.eps

001 Click Edit.

002 Click Keyboard Shortcuts.

The Keyboard Shortcuts and Menus dialog box appears with the Keyboard Shortcuts tab selected.

003 Click 9781118643648-ma319.tif to open the commands for a menu (9781118643648-ma319.tif changes to 9781118643648-ma320.tif).

004 Click a command.

A A blank text box appears.

005 Press a combination of keyboard keys to define a shortcut. A shortcut must include the ctrl.eps key and/or one of the function keys, which are the “F” keys located at the top of most keyboards.

9781118643648-fg1342.eps

B The combination appears in the text box.

006 Click Accept to save the shortcut.

C You can click Undo to cancel the shortcut. You can then press a different key combination.

007 Click OK.

Photoshop closes the dialog box. You can now execute the command by pressing the key combination.

Customize a Menu

9781118643648-fg1343.eps

001 Click Edit.

002 Click Keyboard Shortcuts.

The Keyboard Shortcuts and Menus dialog box appears with the Menus tab selected.

003 Click 9781118643648-ma319.tif to open the commands for a menu you want to customize (9781118643648-ma319.tif changes to 9781118643648-ma320.tif).

004 Click 9781118643648-ma317.tif to hide a menu command (9781118643648-ma317.tif changes to 9781118643648-ma318.tif).

005 Click OK to save the settings and close the dialog box.

9781118643648-fg1344.eps

006 Click the customized menu.

The menu command does not appear. In this example, the command was hidden.

D You can click Show All Menu Items to access the hidden command.

Load HTML and CSS Colors

You can easily access the colors from a web page by loading its corresponding HTML or CSS file. HTML stands for Hypertext Markup Language and is the code for structuring web pages. CSS stands for Cascading Style Sheets and is the code for defining a page’s layout and style.

Photoshop can recognize the color codes in HTML and CSS files and load the corresponding colors into the Swatches panel.

Load HTML and CSS Colors

9781118643648-fg1345.eps

001 Click Window.

002 Click Swatches.

A The Swatches panel appears.

9781118643648-fg1346.eps

003 Click the Swatches panel menu (9781118643648-ma517.tif).

004 Click Replace Swatches to replace the existing swatches with the colors from the file.

B You can click Load Swatches to append the colors.

The Load dialog box appears.

9781118643648-fg1347.eps

005 Click here (9781118643648-ma300.tif) to choose the folder that contains the HTML or CSS file.

006 Click here (9781118643648-ma300.tif) to select HTML file or CSS file.

007 Click the file.

008 Click Load.

9781118643648-fg1348.eps

C Photoshop loads the colors from the file into the Swatches panel, replacing the existing swatches.

For more about the Swatches panel, see Chapter 6.