Auto-rotate?

mercphotomercphoto Registered Users Posts: 4,550 Major grins
edited August 4, 2005 in Finishing School
Is there any way in Photoshop CS (or even CS2) to "auto-rotate"? By that I mean to be able to say "I want this in portrait mode". If the long side is already vertical it does nothing, but if the long side is horiztonal then it applies a 90 degree image rotation. This would be useful for batch printing, for example. Thanks.
Bill Jurasz - Mercury Photography - Cedar Park, TX
A former sports shooter
Follow me at: https://www.flickr.com/photos/bjurasz/
My Etsy store: https://www.etsy.com/shop/mercphoto?ref=hdr_shop_menu

Comments

  • DavidTODavidTO Registered Users, Retired Mod Posts: 19,160 Major grins
    edited August 3, 2005
    mercphoto wrote:
    Is there any way in Photoshop CS (or even CS2) to "auto-rotate"? By that I mean to be able to say "I want this in portrait mode". If the long side is already vertical it does nothing, but if the long side is horiztonal then it applies a 90 degree image rotation. This would be useful for batch printing, for example. Thanks.

    you could try Portraits and Prints, by econ technology. I think that may do the trick.
    Moderator Emeritus
    Dgrin FAQ | Me | Workshops
  • cletuscletus Registered Users Posts: 1,930 Major grins
    edited August 4, 2005
    mercphoto wrote:
    Is there any way in Photoshop CS (or even CS2) to "auto-rotate"? By that I mean to be able to say "I want this in portrait mode". If the long side is already vertical it does nothing, but if the long side is horiztonal then it applies a 90 degree image rotation. This would be useful for batch printing, for example. Thanks.
    You could do it pretty easy as a script:
      if (!app.documents.length > 0) {
      	alert("No active document");
      }
      else {
      	var docRef = app.activeDocument;
      	var docWidth = docRef.width.as("px");
      	var docHeight = docRef.height.as("px");
      	
      	if (docWidth > docHeight) {
      		docRef.rotateCanvas(90);
      	}
      }
    

    To use it:
    1. Cut and paste the above code into a file (I used autoRotate.js).
    2. Start recording an Action in Photoshop.
    3. Open a file.
    4. Use File > Scripts > Browse to direct Photoshop to your script.
    5. Use Save As to save your file.
    6. Stop recording your action.
    Now you can call your action (which will call your script) from the File Browser batch tool.

    There is probably a better way to do this from CS2 (in CS2 you can script Bridge, so you probably wouldn't need to monkey with writing a script, calling it from an action and then calling the action from File Browser.

    Another thing to note is that with CS2 it looks like Adobe is using the .jsx file extension for javascript files for the various Adobe apps.
  • ScottMcLeodScottMcLeod Registered Users Posts: 753 Major grins
    edited August 4, 2005
    cletus wrote:
    You could do it pretty easy as a script:
       if (!app.documents.length > 0) {
       	alert("No active document");
       }
       else {
       	var docRef = app.activeDocument;
       	var docWidth = docRef.width.as("px");
       	var docHeight = docRef.height.as("px");
       	
       	if (docWidth > docHeight) {
       		docRef.rotateCanvas(90);
       	}
       }
    

    To use it:

    1. Cut and paste the above code into a file (I used autoRotate.js).
    2. Start recording an Action in Photoshop.
    3. Open a file.
    4. Use File > Scripts > Browse to direct Photoshop to your script.
    5. Use Save As to save your file.
    6. Stop recording your action.
    Now you can call your action (which will call your script) from the File Browser batch tool.

    There is probably a better way to do this from CS2 (in CS2 you can script Bridge, so you probably wouldn't need to monkey with writing a script, calling it from an action and then calling the action from File Browser.

    Another thing to note is that with CS2 it looks like Adobe is using the .jsx file extension for javascript files for the various Adobe apps.

    Back when I was using picasa (google's imagebrowser), It would autorotate everything according to some data in the EXIF file.


    Does Photoshop still recognize this for batch processing?
    - Scott
    http://framebyframe.ca
    [Bodies] Canon EOS 20D - Canon EOS 500
    [Lenses] Sigma APO 70-200 f/2.8 - Canon EF 85mm f/1.8 - Canon EF 50mm f/1.8 - Tamron XR Di 28-75mm f/2.8 - Canon EF-S 18-55mm f/3.5-5.6
    [Flash] Sigma EF500 Super DG Flash
    [Tripod]
    Manfrotto 055 Pro Black
    [Head] 484RC2, 200RC2
  • mercphotomercphoto Registered Users Posts: 4,550 Major grins
    edited August 4, 2005
    Back when I was using picasa (google's imagebrowser), It would autorotate everything according to some data in the EXIF file.

    Does Photoshop still recognize this for batch processing?
    Yup. Most of the time it is very convenient that it does so.
    Bill Jurasz - Mercury Photography - Cedar Park, TX
    A former sports shooter
    Follow me at: https://www.flickr.com/photos/bjurasz/
    My Etsy store: https://www.etsy.com/shop/mercphoto?ref=hdr_shop_menu
  • DavidTODavidTO Registered Users, Retired Mod Posts: 19,160 Major grins
    edited August 4, 2005
    You could also try these Photoshop Automator Actions instead of AppleScript.
    Moderator Emeritus
    Dgrin FAQ | Me | Workshops
  • XO-StudiosXO-Studios Registered Users Posts: 457 Major grins
    edited August 4, 2005
    Back when I was using picasa (google's imagebrowser), It would autorotate everything according to some data in the EXIF file.


    Does Photoshop still recognize this for batch processing?
    Yup PS does recognize the rotate EXIF data just fine, but it is camera dependant. (My D70 for instance PS is flawless on no matter if I tilt it 90 deg CW or CCW). Every now and then however, I have a visitor or some pictures from an older Sony and they do not set that EXIF data. Also some image processing programs ruin the EXIF.

    FWIW, YMMV,

    XO,
    You can't depend on your eyes when your imagination is out of focus.
    Mark Twain


    Some times I get lucky and when that happens I show the results here: http://www.xo-studios.com
Sign In or Register to comment.