Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Need photoshop to automatically rotate items to make smallest width

Community Beginner ,
Mar 13, 2018 Mar 13, 2018

Hi Guys, I originally posted this on the photoshop forum but they suggested the scripting community might be more helpful. I am attempting automatically rotate item (layer) so that the width of the item is at its narrowest.

So visually I want to go from this...

notminimum.jpg

to this

minimum.jpg

my starting point is this..

starting point.jpg

As you can see from the layers it is an item photographed on a green screen.

My reason for attempting this is to achieve a foolproof auto-rotate action that can be applied to a folder of images. I have played around with various auto rotate tools is CS, LR and even Elements. They work on 95% of the cases but in a few cases it fails (maybe the lines within the image itself are effecting the rotation.

I would also like a maximum amount of rotation to be set. Some items are landscape and some portrait and if any amount of rotation was permitted it would make all landscape images portrait.

Would it be possible to use photoshop scripts to achieve this?

Thanks, James

TOPICS
Actions and scripting
1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Mar 13, 2018 Mar 13, 2018

Capture.jpg

Capture.jpg

JJMack
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 13, 2018 Mar 13, 2018

The problem with the built in Crop and Straighten Photos tool is that in some cases (depending on the photo) it will cut up the image into two or more pieces thinking the single image is actually multiple images. It works 90% of the time but not 100%.

Having said that I am now having trouble recreating this issue with the transparent background.Previously I had tested straightening with the image on a white background. I will do a large batch (9000 images) and test to see if I can break it with a transparent background. Then report back.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 15, 2018 Mar 15, 2018
LATEST

Thanks JJMack. The auto rotate is getting much less confused with the transparent background. Solved

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines