# Photoshop batch resize action/script ?



## mox (Aug 3, 2005)

I'm trying to make an action script for batch resizing (Adding my signature to all the photos too)

The problem that I have, when I record my action.. if I do a Image\Resize for a landscape photo, when the software opens a portrait it's not resizing properly

Is there any way to do 'conditions' with action scripts ?


----------



## hawkriver (Oct 7, 2009)

Well, you can cause the action to pause at a particular step for user input if you click on the little box to the left of the step in the action script, but you can't automate it.

You have basically two choices: make two actions, one for landscape and one for portrait and select only the appropriate files (through bridge for instance) to process with each one; or you can write a script that can detect the aspect ratio and take appropriate action on the resize.


----------



## Big Mike (Oct 7, 2009)

There is a 'fit' command somewhere.  You should be able to incorporate that into your script so that any image will 'fit' into the size specified.


----------



## Flash Harry (Oct 8, 2009)

I do one action for each type frame, I've had PS make f-ups when doing batch actions before, just have a landscape and a portraits folder to run the separate action on. H


----------



## MountainPaul (Oct 9, 2009)

If you are using Photoshop and Version 7 or greater you can use scripts as well as actions.
Here is a very simple script to run a different action depending on orientation.

var doc = activeDocument;
if(doc.width.value>doc.height.value){//Landscape
    doAction("Action Name", "Action Set");
    }else{//Portrait
        doAction("Action Name", "Action Set");
}


----------



## airforce1 (Oct 9, 2009)

I recommend below steps if you want nice uniform looking:
1.creating a square canvas firstly for holding resized photos
2.using a transparent canvas in the same size as above and put your watermark as your want
2.resize the photos and ctrl+a and ctrl+c
3.paste the resized photos into the square canvas and it would be centered automatically
4.you could also paste your watermark now
4.save or export

All above actions are recordable in one batch process. 

Wish this help,


----------



## digitalpbk (Nov 4, 2009)

There is a new method to do batch image resize in CS3 
Goto File > SCripts > Image Processor

So simple.


----------



## KmH (Nov 4, 2009)

This thread originated in 2005!


----------

