Join Julieanne Kost for an in-depth look at how to prepare actions to work on file with different bit depth, color space, image size, resolution, and more.
- [Instructor] There are a number of different things that can stop an action in its tracks. In the next few minutes we're going to take a look at a number of different commands that we can include in our action to help them be more successful when we run them on different images. I have three images right here. We're going to start with the Train image and I'm going to use that to record the action, but I just want to point out that there's a lot of differences between the train and these other files. For example the train is a flattened file, it's a jpg, whereas I have a layered file, which is a psd. The layered file is also in 16-bit and is in CMYK for the color mode, whereas this file over here is in eight-bit RGB.
So I need to make an action that will accommodate all of these differences in these source files. So I'll double-click on the Train jpg to open it in Photoshop, and let's create a new set of actions. I'll call this Image Prep, and then we'll start recording our first action, and I'll call this Diffuse Glow with Keyline. So I just want to add a filter to this image and I want to add a little keyline around it that will also dim back the outside edge of the photograph.
So I'll click Record, and in order to think through this, well first of all I'm on a flattened layer, so I need to record a step in my action that will actually merge multiple layers together if I have them. But, right now when I go under Layer, I can't select the flattened image because this is a flat file. So a lot of times when you're recording actions, you'll need to put your image in the state that you think the other files might be in, so that you can record the correct commands. So in this case at the bottom of my Layers panel, I'll click on the New Layer icon, and then I'll choose Layer, and then Flatten Image.
I don't need the Make layer command in my action, but I can throw that away when I'm finished recording, or I could stop recording now and throw it away, but it'll be easier because we're going to record a lot of different commands that we won't need, so I'll throw them all away at the end. Because some of my other images might be in other color modes, I'll go to the Image, Mode menu, convert to CMYK temporarily, and then record Image, Mode, and the conversion to RGB Color.
I'll do the same under Mode, I'll convert to 16 bit, and then return to convert back to eight bit. I'll also want to make sure that the images are the same file size and aspect ratio, because features such as filters or type size, adding a feather or an unsharp mask, they generally won't give the same effect if you're working on files of different sizes. For example, a three-pixel Gaussian blur is going to look completely different on a low resolution file versus a high resolution file.
So I'll tap C to access the Crop Tool, and I want to enter in the width and height of the crop that I want. But before I enter the values for the Crop Tool, I need to make sure that I'm recording this action with my units and rulers set to inches. So I'll use Command + R in order to show my rulers, and then right-click in the ruler area, and make sure that Inches are selected. All right, since the inches are selected, then I can enter in the values, and I want to make sure that this is six inches by four inches, at 300 pixels per inch.
Now in this image, I need to reverse the orientation so I'll click on the double-headed arrows, and then if I need to, I could reposition the crop, and tap Return or Enter in order to apply it. When I crop the image, obviously it gets a lot smaller, and I want to view this in the Fit in Screen so I want to view it a lot larger, but if I go to View and I select Fit on Screen, while I can see this now larger, it didn't record that command as part of the action.
So from the Actions fly-out menu, I'll choose Insert Menu Item, and then go to the View menu and choose Fit On Screen. It enters that value here and when I click OK, we can see that it's been recorded and added to my action. Now before I add my filter, I need to make sure that I reset my foreground and background colors, because the diffuse glow filter actually uses the foreground and background color. So I'll tap the D key. That will give me my default black and white foreground and background color swatches, and then choose Filter, Filter Gallery.
Select Diffuse Glow. Choose to Fit in View so that I can see the effects, and then make any adjustments that I need to on the filter. I'll click OK to apply it, and just one thing to point out. If I wanted to record this in a more flexible manner I could change the background into a smart object so that I would apply this filter as a smart filter, but because I want this action to repeat the same commands on multiple images, and I know that I want those values, well I don't really need to make it a flexible editing environment.
Now, to add the keyline, I'll do a quick Select All, and then Modify that selection by choosing Contract, contracting it by 50 pixels, and applying the effect at the canvas bounds. Then, I'll use Edit, and Stroke. I'll choose three pixels for the width. I'll select a color from my image, making sure that the location is set to the inside so that the stroke has sharp edges at the corners, and click OK.
Then, in order to screen back or lighten up the area outside of the stroke, I'll choose Select, Inverse, and then Edit, Fill. I'll fill it with white at 50% opacity. Click OK, and then as a final step, I'll deselect. Now we'll stop recording, and we can clean up our action. So for example I don't need the initial Make layer step, so I'll drag that to the trash.
If we look at all of these different convert modes, I don't need to convert to CMYK, so I can drag that to the trash, nor do I need to convert to 16 bit. Because I don't know if all of the images will have the same aspect ratio, I want to be sure to click in the empty well next to the Crop menu item here. If I wanted to change the color for each stroke on each image, I could also click in the empty well there. So in the case of the stroke, that's going to bring up the stroke dialog where I can pick the color.
In the case of the Crop Tool, it's going to bring up the crop, but not apply the crop, so I can modify it before I move through the rest of the action. All right, let's choose File, and Revert. I'll go ahead and zoom out using Command + 0, and then let's play the action. We can see that it stops or it breaks on the crop, in case I want to reposition this, or change the crop size. I'll tap Return or Enter to apply the crop.
It brings up the Stroke, where I could go in and pick a different color, click OK, and OK again. All right so it's working on this image. Let's go to Bridge, and open up these other two images. I'll select the Move tool just to get rid of the crop marquee there for a moment. And now let's run the action. On this image you can see that this is a layered document so it's not a background here, it's a layer, and this is also in a different color mode, and a different bit depth.
I'll click Play, and look what happens. It brings up the crop marquee and it's bringing it up based on that other image, but let's zoom out using Command + 0, and I can reposition this crop, and I can even reposition it so it flips from vertical to horizontal. Then I'll apply the crop. It'll continue playing the action. I could pick a different color if I wanted to. Click OK and OK again, and we can see that the action was successful on this image.
Let's move to our last image here, and play the action again. I'll click Play, it'll bring up that crop marquee. We can see this was a different size, so I'll adjust the crop. Tap Enter or Return. In this case I'll keep the same color, and click OK. So as you can see when you're working with different files that are in different color modes or bit depths, or have different file sizes, there are commands that you can use to help align your documents so that the action runs more successfully.
Released
6/30/2017- Quickly saving images as different file types
- Creating single and multi-step actions
- Saving and loading actions
- Inserting stops, menu items, and conditionals
- Tips for working with layers
- Using the Batch command
- Creating droplets
- Automatically creating graphics from layers using generators
- Working with variables and scripts
Share this video
Embed this video
Video: Preparing files for actions