View Full Version : Scripting / Pre-Set Actions?
Physics_Guru
04/06/2005, 04:45 PM
I had breifly mentioned in another room that I was wondering if you can 'script' in photoshop. Let me give a detailed example of what I want to do and hopefully someone can either tell me how to do it or ways to do it if it is impossible.
I would like to setup one type of border that I like and use it across many different images. I know this can be done by dragging the layer from one file to another and then using the transform tool to size it to the picture.
I am looking for something much more simple. Basically a way to write a script or something that when I tell it 'go', it will drop the border onto the picture that is open and size itself accordingly.
If this cannot be done in the manner I say, they should make it so it can. :)
Scott
04/06/2005, 05:02 PM
It can actually be done with actions provided you aren't looking for something overly complex and you chose the right menu options.
For instance, open an image, create a new action and start recording.
Select all
Choose Select > Modify Selection > Border
In put the number of pixel you want the width of your border to be.
hit d on the keyboard (resets colors to default) Or set the foreground color to your desired border color.
Choose Edit > Fill > Foreground color from the menu (or hit option/alt + delete)
Stop recording.
This will result in an action that will always produce a black border around any image you open and run the action on. One drawback is that it will create the border inside your picture dimensions. So if you use a 4 pixel border you'll be cropping the image by 8 pixels total.
To get around this.....
open an image, create a new action and start recording.
Double click the background layer and then hit okay (to unlock it).
Select all
hit d on the keyboard (resets colors to default) Or set the foreground color to your desired border color.
Choose Image > Canvas size from the menu
Increase width and height by, say 10 pixels
Create a new layer
Choose Select > Modify > Expand from the menu.
Increase the selection by twice your desired border width. If you want a 4 pixel border, then input 8 pixels in the dialog box (4 for each side).
Choose Edit > Fill > Foreground color from the menu (or hit option/alt + delete)
Then hit command/control-[ on the keyboard (this moves the filled box below the image)
From the Layer Palette flyout menu choose "Flatten Image"
Stop recording.
That will give you a border outside your image dimensions and therefore won't crop or cover any image data.
vBulletin v3.0.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.