Ask Dr. Bob - Action Script in Photoshop

by Robert Whetton 16. September 2008 22:10
Here's a letter from Joe Bob Henry Jed of Deer Creek Falls, Cornwall. And he asks: "Dear Dr. Stupid, how come some camels have one hump, and others got two?"
That's a very good question, Joe Mark... Bob... Joe... Henry, Bob? Well, Joe, this is where gasoline comes from.... One hump for regular... and two for premium, and unleaded?

I'm sure I'll run out of those.. A question from another POTN member breadandbutter. He would like to know how to turn this.

And

To make this

All in one hit, so he can batch a directory of Student shots.

Ok, so everything is resized, I'm not going into resizing here, just joining the two shots to make the one.
So we'll start with just the shot of the student.

In the Actions Palette hit the new action button.

This will bring up a new action dialogue box.

Type in the name you want to call the action, I called mine Group Shot.
Ok so now we're recording the action, the first thing we'll so is to expand the Canvas slightly, so going to the Image Menu, select Canvas Size...

Then check the Relative Box and enter 4 pixels in the height and width boxes, then select White in the Canvas extension color.

Hit OK, and you'll have an image like this.

Now we have our border, we need to think about expanding the image to accommodate the larger group shot. First we need to Duplicate the Layer so on the keyboard hold down Ctrl (Command for you Mac people) and hit J, this will duplicate the selected Layer in your Layers Palette.

With the Layer Duplicated we can now work on expanding the canvas. So once more go up to the Image Menu and select Canvas Size...

Because we're looking at putting the Student shot in the top right corner, we'll expand the canvas from that corner. So in the 3x3 grid click on the top right, this will then change to show how the canvas is going to expand. So we don't have to work out how large our image is and take it away from our final size, un-check the relative box, and now we're working directly with the canvas size. The finished size is 800x600px (or however big you're working), so put 800 in the width and 600 in the height and click on OK.

The canvas will now resize to 800x600 pixels, keeping our original image at the top of the screen.

Now its time to bring the Group shot in. Head up to File and Open.

Browse to where your Group shot is stored - be sure not to move it once you have made the Action..


Once you have loaded the Photo into Photoshop, select all Ctrl (Command) and A.

Copy the selection Ctrl (Command) and C. Close the photo. Select the background.

And paste the copied photo, Ctrl (Command) and V.

Look at that, you now have your original student shot on top of the group shot! Ok now we'll shift the student shot into place. Select the Move Tool from the Tool Palette.

Select the top layer

Using the cursor (arrow) keys nudge the shot into position.

Ok so when you're happy that you have your student shot in the right place, we'll add a shadow to help give it some depth.
Go to the Layers Palette and click on the fx icon and select Drop Shadow...

We don't want a heavy shadow so drop the opacity to 30%

All thats left now is just to flatten everything into one. In the Layers Palette, got the palette menu at the top right and select Flatten Image.

Thats it, we're done! hit the stop button in the Actions Palette. Close everything - do not save the file - open the student shot again and run the action to make sure its all working.
Batch processing, using the Image Processor is probably the easiest way to customise this action, it will allow you to specify the image format, JPG, TIFF etc, and easily let you select an output directory. (thanks to poloman for suggesting this).

I've selected the directory which contains the student shots as my source, you can save in the same directory as image processor makes a new directory for each of the different file types, so if you just save as JPG then it will create a new directory called JPG. I've told it that i want all the images converted to sRGB, this will correct any of the images if they happen to be in aRGB etc. At the bottom you'll see a check box to allow any Action you have to be run. Check the Run Action... and then select the Group shot action.

Sit back and watch it do its magic on your directory of student shots.

If you found this tutorial useful and you want to keep seeing these kind of tutorials, please consider making a donation




About Me

Robert Whetton
Dorset Photographer

Dorset Events Photographer in the UK. Portraits, Weddings, Events, Gigs, Sports and Photo Re-Touching.
Website | Facebook

Archive Posts

Page List