Actions register not just the dialog boxes you bring up while recording, but the exact settings you assign to them as well. There may be times, however, when you'll want to create an action for tasks that require you to change these values on a per-image basis. Photoshop allows you to enable what's called a modal control to pause the action at the point where you need to enter your alternative settings.
Modal controls can also be used with tools such as Crop or Transform that require you to commit to a task before it is applied. With a modal control enabled, the action will pause so you can alter the adjustment you performed when recording the action. And as soon as you commit to your new adjustment (usually by clicking OK or pressing Enter/Return) the action resumes running. Confused? Don't worry. This is much easier to demonstrate than explain, as you'll see in the example below.
Here’s an action to crop an image in a way that will extend the canvas, automatically filling in the empty areas using Content-Aware Fill. First, open an image and click the New Action button as described earlier. Begin recording and do the following:
The problem with this action is that, when applied to other images, the crop dimensions will always be identical to those when we created the action. To gain the ability to customize the crop for different images we need to add a modal control. And it couldn't be simpler to do.
After trying out this action on your own images you'll soon realize that Content Aware Fill is not perfect. Although it attempts to 'intelligently' choose areas from which to sample - and will vary its sampling area on successive attempts - the more detailed the background you're expanding and/or the larger the expansion you specify, the greater the chance the image will need some extra attention afterwards. In my image the left side of the image showed obvious defects. I needed to manually use the healing and clone tools to get the result you see below.
|Here is the original image.||After the action is run, the image canvas is extended slightly along the left side and bottom of the frame.|
The views and opinions expressed in this article are those of the author and do not necessarily reflect the views and opinions held by dpreview.com or any affiliated companies.