PDA

View Full Version : Auto-rotate?


mercphoto
Aug-03-2005, 03:31 PM
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.

DavidTO
Aug-03-2005, 04:51 PM
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.

cletus
Aug-04-2005, 06:23 AM
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:


Cut and paste the above code into a file (I used autoRotate.js).
Start recording an Action in Photoshop.
Open a file.
Use File > Scripts > Browse to direct Photoshop to your script.
Use Save As to save your file.
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.

ScottMcLeod
Aug-04-2005, 08:18 AM
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:



Cut and paste the above code into a file (I used autoRotate.js).
Start recording an Action in Photoshop.
Open a file.
Use File > Scripts > Browse to direct Photoshop to your script.
Use Save As to save your file.
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?

mercphoto
Aug-04-2005, 08:30 AM
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.

DavidTO
Aug-04-2005, 09:26 AM
You could also try these Photoshop Automator Actions (http://www.completedigitalphotography.com/index.php?p=339) instead of AppleScript.

XO-Studios
Aug-04-2005, 11:06 AM
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,