PhotoshopForums.com Home
Navigate Contact FAQ Search Members
Automatic rotation of portrait photos
Post new topic   Reply to topic    PhotoshopForums.com Forum Index -> Actions and Automation
 See a User Guidelines violation? Please contact us.
Author Message

derekc

Joined: 17 Jul 2010
Posts: 3



PostPosted: Sat Jul 17, 2010 3:20 am    Post subject: Automatic rotation of portrait photos Reply with quote

I take a large number of images at a time, often for other people and always in Raw (Canon EOS 5D). Is there a way of Photoshop (CS3) detecting portrait mode images from the EXIF info, and rotating them 90 CW automatically, in a Batch command. I would then save them as jpegs in the Batch and pass to someone else.
_________________
Derek Clements
View user's profile Send private message Send e-mail

Paul R

Joined: 06 Apr 2010
Posts: 57



PostPosted: Sat Jul 17, 2010 5:23 am    Post subject: Reply with quote

You might be better doing all this from Bridge, you could use the following code to select the portrait pics, then ctrl/r to open them all in ACR and from there you can save them to JPG the orientation should be automatic.

Save the code as filename.jsx (plain text file)
Start Bridge
Edit - Preferences -Startup Scripts
At the bottom click the "Reveal Button" this will open the folder where the script should be placed.
Close and restart Bridge.

To use:
Mouse Right click (menu) and select "Select Portraits"
Code:

#target bridge   
if( BridgeTalk.appName == "bridge" ) { 
selectPortraitPics = new MenuElement("command", "Select Portraits", "at the end of Thumbnail");
}
selectPortraitPics.onSelect = function () {
     selectPortrait();
}

function selectPortrait() {
app.document.deselectAll();
var sels = app.document.visibleThumbnails;
for (var a in sels){
if(sels[a].type != "file") continue;
var testThumb = new Thumbnail(sels[a]);
app.synchronousMode = true;
var orientation = testThumb.core.quickMetadata.rotation;
if(orientation == 8) app.document.select(sels[a]);
   }
}
View user's profile Send private message

derekc

Joined: 17 Jul 2010
Posts: 3



PostPosted: Sat Jul 17, 2010 9:59 am    Post subject: Reply with quote

Thanks for your reply.

I've set this up but can't get it to work. The 'select portraits' appears in the menu.

Do I do the right click (menu) on the folder containing the raws in Bridge, or do I select all files within the folder? Neither appears to work.

Derek

_________________
Derek Clements
View user's profile Send private message Send e-mail

Paul R

Joined: 06 Apr 2010
Posts: 57



PostPosted: Sat Jul 17, 2010 10:39 am    Post subject: Reply with quote

I missed the other 180deg rotation, sorry.
You should be able to navigate to the required folder then run the script, all it will do is select all the portrait pics.
This is now modified to select all types of portrait pics.
Code:

#target bridge   
if( BridgeTalk.appName == "bridge" ) { 
selectPortraitPics = new MenuElement("command", "Select Portraits", "at the end of Thumbnail");
}
selectPortraitPics.onSelect = function () {
     selectPortrait();
}

function selectPortrait() {
app.document.deselectAll();
var sels = app.document.visibleThumbnails;
for (var a in sels){
if(sels[a].type != "file") continue;
var testThumb = new Thumbnail(sels[a]);
app.synchronousMode = true;
var orientation = testThumb.core.quickMetadata.rotation;
var Height = testThumb.core.quickMetadata.height;
var Width = testThumb.core.quickMetadata.width;
if(Height > Width) app.document.select(sels[a]);
if(orientation == 8 || orientation == 6) app.document.select(sels[a]);
   }
}
View user's profile Send private message

derekc

Joined: 17 Jul 2010
Posts: 3



PostPosted: Sat Jul 17, 2010 11:37 am    Post subject: Reply with quote

Thanks. I've installed the new script.

It still doesn't appear to work. Should the folder be open in Bridge, ie showing the files, or one level up showing the folder?

The other explanation is that the raw files don't contain the information that's needed for the script to work, but I'm not sure how to check.

Thanks for your patience.

Derek

_________________
Derek Clements
View user's profile Send private message Send e-mail

Paul R

Joined: 06 Apr 2010
Posts: 57



PostPosted: Sat Jul 17, 2010 11:43 am    Post subject: Reply with quote

Yes you need to navigate to the folder where the files are to be selected.
If it still doesn't work it may be down to how you have saved the script.
Some editors will enter control characters into the script and stop it working. The best this is to use ExtendScript ToolKit, this is installed with Photoshop.
I have tested the script in CS3/4 and 5 so I do know it works.
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PhotoshopForums.com Forum Index -> Actions and Automation All times are GMT - 6 Hours
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Contact - User Guidelines >

Copyright © 2003-2016. PhotoshopForums.com, iFroggy Network. All Rights Reserved.
Powered by phpBB © phpBB Group. phpBB SEO. Privacy Policy.
We are in no way affiliated with Adobe. Photoshop, Adobe and related marks are registered trademarks of Adobe.
PhotoshopForums.com