CS3, 750px on longest side action?

thompo

Suspended / Banned
Messages
576
Name
Neil Thompson
Edit My Images
Yes
Is there anyway i can create a single action that will resize my shots to 750px (or any other) on the longest side?

I presently have 2 actions one for Portrait and one for Landscapes, but id prefer to hit 1 button and do the lot:lol:

Any ideas?

Cheers Neil
 
You can use File - Automate - Fit Image with width and height set to 750
This can be part of your action.
 
I use an action while calls a script which resizes the longest edge to 800 pixels & 72 dpi.
I didn't write it but found it online somewhere and modified it to suit.

doc = app.activeDocument

var startRulerUnits = app.preferences.rulerUnits
app.preferences.rulerUnits = Units.PIXELS

if (doc.width > doc.height)
doc.resizeImage(800, null, 72, ResampleMethod.BICUBIC)
else
doc.resizeImage(null, 800, 72, ResampleMethod.BICUBIC)

app.preferences.rulerUnits = startRulerUnits

Feel free to do the same :)

Edit to add: This is in CS3 so may want to double check it doesn't use something not in CS3
 
I use an action while calls a script which resizes the longest edge to 800 pixels & 72 dpi.
I didn't write it but found it online somewhere and modified it to suit.



Feel free to do the same :)

Edit to add: This is in CS3 so may want to double check it doesn't use something not in CS3

so how do I write the script and action to do this? I've never done it before and an a tad confussled!
 
It would be better written like this as you haven't taken into account square documents.
Code:
var startRulerUnits = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;
fitImage(800,72);
app.preferences.rulerUnits = startRulerUnits;

function fitImage(newImgSize,res) { 
	var doc = app.activeDocument;
      if (doc.width > doc.height) { 
         doc.resizeImage(newImgSize, undefined, res, ResampleMethod.BICUBIC);
         } 
      if (doc.width < doc.height) { 
         doc.resizeImage(undefined, newImgSize, res, ResampleMethod.BICUBIC);
         } 
      if (doc.width == doc.height) { 
         doc.resizeImage(newImgSize, newImgSize, res, ResampleMethod.BICUBIC); 
         } 
}
 
Back
Top