What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

detect image orientation


tripitaka

New Member
Messages
1
Likes
0
Hi all,

First post! Hope someone can help.

I have a folder of many images. I would like to batch process the folder. To each image i want to detect if its a landscape or portrait image then add a logo to the image depending on the orientation.

I know i can separate out the images in the folder but that will take more time which i am trying to save!!

thanks
Andy
 
You can use a script as part of your action..
Save the code as FileName.jsx in the Photoshops preset/scripts folder.

Code:
var doc = activeDocument;
if(doc.width.value>doc.height.value){//Landscape
	doAction("Action Name", "Action Set");
	}else{//Portrait
		doAction("Action Name", "Action Set");
}
Amend the Action Name and Action set to suit.
Now you can create a new action that call this script that will then call the action for the correct orientation.
When recording the action use: Insert Menu Item then File - Scripts and select your script.
 


Write your reply...

Back
Top