Work­ing smarter with Ac­tions

Hans Weichselbaum con­tin­ues his se­ries on work­ing with Ac­tions when you’re edit­ing and for­mat­ting your images

The Photographer's Mail - - Tutorial - Hans Weichselbaum

Work­ing on your pho­tos is fun, but, af­ter a while, you will have no­ticed that you re­peat the same steps over and over on most of your images. Then there is the dan­ger that you might get dis­tracted and leave out an es­sen­tial step in your work­flow — or even per­form the same one twice. Most im­por­tant, there is the mat­ter of time: do you re­ally want to spend hours re­nam­ing and re­siz­ing your shots when you could do some­thing more pro­duc­tive?

Last time, in Is­sue No. 213, we looked at the ba­sics of writ­ing and run­ning a Pho­to­shop Ac­tion. In this ar­ti­cle, I want to take you a step fur­ther, look at some more-com­plex Ac­tions, and in­tro­duce you to script­ing. Even if you have never writ­ten a sin­gle Ac­tion, you’ll cer­tainly have used some — ev­ery time you’ve made a con­tact sheet, pulled up the Lens Cor­rec­tion fil­ter, or stitched your panora­mas with Pho­to­shop’s Pho­tomerge.

Think of some­thing that you do all the time — wouldn’t it be nice to achieve the same re­sult with a sin­gle mouse click? For ex­am­ple, you may need to cen­tre a layer hor­i­zon­tally and ver­ti­cally rel­a­tive to the page. Do­ing it man­u­ally, you’d choose Edit > Se­lect All, pick the Move tool, and click the two Cen­tre Hor­i­zon­tally and Cen­tre Ver­ti­cally but­tons on the Op­tions bar. If you work from an Ac­tion, you can do the lot with one click or a key­board short­cut.

An Ac­tion can be any­thing from one step that sim­ply reaches a hidden com­mand quickly to dozens of com­plex steps that com­bine a va­ri­ety of op­er­a­tions from dif­fer­ent menus.

Some prepa­ra­tion

To start record­ing your Ac­tion, you need an open file. Make a du­pli­cate of the image to have a dummy file to work on — that way, the orig­i­nal doc­u­ment won’t get dam­aged.

If one of your Ac­tion steps is to click on a layer named Layer 1, then the Ac­tion is in­ter­nally recorded as ‘click the layer called Layer 1’. If you run this Ac­tion on a dif­fer­ent file that hasn’t got a ‘Layer 1’, Pho­to­shop will sim­ply sit there and look at you — so if you want to ac­ti­vate spe­cific lay­ers, you’re bet­ter off learn­ing the key­board short­cuts that will let you go to the next layer up, the next layer down, the bot­tom layer, etc., rather than in­cor­po­rat­ing them into your Ac­tion.

If you want your new Ac­tion to run on a folder full of images, you’ll need to start with a File Open com­mand and fin­ish with a File Save com­mand — and don’t for­get to have File Close as your last step, oth­er­wise you’ll get dozens, or even hun­dreds, of images pil­ing up on your screen! When run­ning the Ac­tion, you’ll need to nav­i­gate to File > Au­to­mate > Batch. We looked at the Batch com­mand in­ter­face in the last ar­ti­cle.

If you use cer­tain tools in your Ac­tion, Pho­to­shop re­mem­bers the tool’s po­si­tion within the image by sav­ing its co­or­di­nates.

A prac­ti­cal ex­am­ple

An­other way to po­si­tion a layer is to use the Align Layer con­trols and then man­u­ally move the layer to the po­si­tion you want it. For ex­am­ple, if you want to place a water­mark with your copy­right in­for­ma­tion in the cor­ner of all your images — say, in the right-bot­tom cor­ner, 10 pix­els away from the sides (as seen in Image 1), this can be done with the fol­low­ing steps: 1. Type in your text. 2. Next, you need to en­sure the water­mark will align prop­erly for both land­scape and por­trait shots: se­lect both lay­ers, the text and the back­ground layer, in the Layer pal­ette by click­ing on them with the shift key pressed. Then se­lect ‘Link Lay­ers’ un­der the Layer menu. 3. Grab the Move tool from the tool­box. This tool gives you a cou­ple of choices for the layer align­ment in the Tool menu bar (see Image 2). With those con­trols you can align the text layer to the mid­dle or to any side of your image. 4. Click on the text layer, then use the key­board ar­row keys to move the water­mark a cer­tain num­ber of pix­els away from the image edges. These steps, built into an Ac­tion, will guar­an­tee the ex­act place­ment of your water­mark, wher­ever you want it, in­de­pen­dent of the as­pect ra­tio of the image.

Script­ing

In the last is­sue, we looked at ‘con­di­tional steps’, which in­volves an Ac­tion branch­ing into two separate Ac­tions, de­pend­ing on a cer­tain con­di­tion. Script­ing can take you to a new level. With scripts, you can do any­thing from cre­at­ing a new doc­u­ment with a spec­i­fied size to au­to­mat­i­cally ap­ply­ing fil­ters and ef­fects on an en­tire di­rec­tory tree. Scripts work equally well in Il­lus­tra­tor, in which you can cre­ate path items, sym­bols, and other art. In text ap­pli­ca­tions, you can quickly change the font, font size, jus­ti­fi­ca­tion, or any num­ber of prop­er­ties. An­other script will take a chunk of text, run it through a trans­la­tor, and re­place the orig­i­nal text with all the orig­i­nal for­mat­ting.

To write your own scripts, you need to use a spe­cial script­ing lan­guage. For Macs you can use ei­ther Ap­pleScript, which is the eas­i­est one to learn, or JavaScript. In Win­dows you get a choice be­tween JavaScript, Vis­ual Ba­sic, and VBScript. JavaScript is the way to go — mainly be­cause it is plat­form in­de­pen­dent and many web de­sign­ers will al­ready be fa­mil­iar with it. You’ll prob­a­bly want to start by look­ing at Adobe’s script­ing re­sources at adobe.com/de­vnet/pho­to­shop/ script­ing.html, and there are many other tu­to­ri­als and use­ful scripts out there.

How­ever, in this ar­ti­cle, we only look at a few scripts that are most use­ful to us pho­tog­ra­phers,

and you’ll find them al­ready on your com­puter un­der File > Scripts. But you will also find some ready-made scripts in the File > Au­to­mate menu. Some ex­am­ples in­clude Fit Image (for re­siz­ing images), PDF Pre­sen­ta­tion (to make PDFs for print out­put or slide shows), Con­tact Sheet, Merge to HDR (high dy­namic range), and Pho­tomerge (to merge panorama shots or mul­ti­ple scans).

Now, let’s have a look at the ready-made scripts that you will find un­der the File > Scripts menu (Image 3). Prob­a­bly the most im­por­tant and use­ful script is the Image Pro­ces­sor.

The Image Pro­ces­sor

In the last ar­ti­cle, we looked at the Fit Image com­mand to re­size both land­scape and por­trait shots to a fixed size for your web gallery. Adobe’s Image Pro­ces­sor (seen in Image 4) is an even niftier way for au­to­matic re­siz­ing. It is also a cool so­lu­tion for con­vert­ing your images into JPEG, PSD, and TIFF for­mats, and this will save you tons of time.

It gives you con­trol over the JPEG com­pres­sion and au­to­mat­i­cally con­verts to the sRGB colour space. And if that isn’t enough, you can also run an Ac­tion at the end — for in­stance, to sharpen your images. It even al­lows you to add your copy­right in­for­ma­tion!

The Image Pro­ces­sor can also be di­rectly ac­cessed from the Bridge via Tools > Pho­to­shop > Image Pro­ces­sor.

Other scripts un­der the File menu

Some of the other ready-made scripts are:

• Delete All Empty Lay­ers: if you love to work with lots of lay­ers, it might not be a big sur­prise when you end up with lots of empty lay­ers. This lit­tle script will re­duce the clut­ter from your layer stack. Only empty lay­ers will be af­fected; dummy-type or shape lay­ers (with­out any vis­i­ble con­tent) won’t be deleted.

• Flat­ten All Layer Ef­fects: the idea is to make layer ef­fects, such as Stroke, Drop Shadow, etc., per­ma­nent. This is not some­thing I rec­om­mend, as I am a great fan of keep­ing my images in an ed­itable state. Some peo­ple, how­ever, have found that the layer ef­fects don’t dis­play prop­erly af­ter flat­ten­ing an image. My sug­ges­tion is to try Save As and make a flat­tened copy to see what hap­pens.

• Flat­ten All Masks: again, this is not a step I rec­om­mend, be­cause it’s al­ways bet­ter to work non-de­struc­tively and keep all your masks.

• Ex­port Lay­ers or Layer Comps to Files: this is par­tic­u­larly use­ful if you have dif­fer­ent in­ter­pre­ta­tions of an image sit­ting in separate lay­ers. This com­mand will split them into in­di­vid­ual files.

• Script Events Man­ager: this script comes in handy if you want to make some­thing hap­pen ev­ery time you per­form a par­tic­u­lar task. For ex­am­ple, if you want to con­vert the back­ground layer into a Smart Ob­ject ev­ery time you open a doc­u­ment, you’d start by record­ing a sim­ple Ac­tion that sim­ply con­verts the back­ground layer into a Smart Ob­ject. In the Script Events Man­ager you’d choose the event you want to work with — in our case, Open Doc­u­ment — then se­lect the Ac­tion you want to run when the event hap­pens.

• Load Files into Stack: this script (seen in Image 5) is a great way to au­to­mat­i­cally load a se­ries of images into a mul­ti­lay­ered doc­u­ment. If you se­lect cam­era RAW files, they are loaded ac­cord­ing to the last set­tings you ap­plied, or the de­fault set­tings if you haven’t pre­vi­ously pro­cessed them. You can ask Pho­to­shop to At­tempt to Au­to­mat­i­cally Align Source Images (note that Adobe uses the word ‘at­tempt’ as a built-in dis­claimer, in case it doesn’t work). If you click the se­cond check­box, the stack of lay­ers gets con­verted into Smart Ob­jects.

Bridge has some au­to­mated func­tions, which, in some ways, are su­pe­rior to sim­i­lar tasks of­fered in Pho­to­shop. For ex­am­ple, Pho­to­shop’s au­to­mated Con­tact Sheet II com­mand cre­ates a lay­out of thumb­nails, but you need to run the en­tire process to see the end re­sult. If you don’t like it, you have to start all over again. In Bridge, you can use the Out­put Mod­ule and get all the op­tions such as paper size and image lay­out. You can try dif­fer­ent set­tings and see straight away what the con­tact sheet is go­ing to look like.

Con­clu­sions

As Pho­to­shop gets smarter with ev­ery new ver­sion, it al­lows you to in­crease your ef­fi­ciency and pro­duc­tiv­ity. Have a look at Ac­tions, Droplets, and Scripts — this will quickly con­vince you to spend your time on more cre­ative work. Look­ing at other peo­ple’s Ac­tions and analysing them step by step is a great way to learn about Pho­to­shop and how to achieve a cer­tain ef­fect.

Script­ing takes au­to­ma­tion to the next level. You will love it if you have pro­gram­ming skills, but chances are that you will be able to find ready-made scripts to suit all your needs.

Image 1 — Us­ing an Ac­tion to add copy­right in­for­ma­tion

Image 2 — The Align Layer con­trols for the Move tool

Image 4 — The Image Pro­ces­sor

Image 5 — The Load Files into Stacks

Image 3 — Pho­to­shop’s built-in scripts

Newspapers in English

Newspapers from New Zealand

© PressReader. All rights reserved.