1

For starters to be clear, I'm looking to manipulate canvas size. Not image size.

I want to create an action to automatically increase the width and height of my canvas in Photoshop to a specific size when necessary. I only want this to happen if my canvas is less than that specified size. For example: Let's say my canvas size is 300x250. I want the canvas to be at LEAST 600x600. If I run my action it will increase the canvas size to 600x600 for me. If I run this same action on an image where the canvas size is already 700x700, it won't do anything at all to it.

It would also need to work with the height and width on an individual basis. If my image is 400x800, the action would increase my width from 400 to 600, but it would leave the height of 800 alone.

It's kind of like the "Fit Image" option in Photoshop, but I only want to manipulate my canvas size, NOT my image size.

1
  • 1
    It is possible via scripting: javascript, actionscript (mac) or vbscript (windows). Exactly how, I can't say without doing it myself, and I am not that familiar with the SDK ( see: adobe.com/devnet/photoshop/scripting.html )
    – horatio
    Nov 30, 2011 at 22:40

1 Answer 1

0

Photoshop Actions (what we used to call "Macros," back in the day) are just recorded steps. There is no equivalent of conditional statements, loops, or any of the things you'd find in a scripting language.

As horatio says, this is absolutely doable with scripting. You'll find a complete manual for each of the three possible scripting languages (Applescript for the Mac, VBscript for Windows, javascript for either) in your Photoshop application folder. Look in the Photoshop [version #] folder for one called "Scripting" and inside that a folder called "Documents."

If you utilize the Script Events Manager (it's under File > Scripts), you can run your script any time a file is opened. It shouldn't be a complex script, since all you're doing is putting a canvas resize inside a simple conditional. The good folks on SO might help you out with it, or you'll find a small army of Photoshop scripting mavens on the Adobe website. Scripters, in my experience, are incredibly helpful people, and will usually write a script, test it, and stick it in an answer for you.

1
  • Thanks for the reply. I had a feeling it was going to take some scripting to pull this off. I was just hoping there was some built-in Photoshop menu(s) I had overlooked that would make this simple.
    – jkupczak
    Dec 1, 2011 at 13:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.