+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Newbie
    Join Date
    Jul 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    detect image orientation

    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

  2. #2
    The Script Master
    Join Date
    May 2009
    Location
    Bradford,UK
    Posts
    208
    Thanks
    0
    Thanked 38 Times in 34 Posts
    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.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Powered by vBulletin® Version 4.1.9
Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.
Content Relevant URLs by vBSEO 3.6.0
Copyright 2011 Photoshop Gurus Forum. All rights reserved.
All times are GMT -5. The time now is 05:08 PM.
vBulletin Skins