RetouchPRO

Go Back   RetouchPRO > Technique > Photo Retouching
Register Blogs FAQ Site Nav Search Today's Posts Mark Forums Read


Photo Retouching "Improving" photos, post-production, correction, etc.

Automating aspect ratio size

Reply
 
Thread Tools
  #1  
Old 04-20-2017, 07:39 AM
Shot8un Shot8un is offline
Junior Member
 
Join Date: Mar 2017
Posts: 3
Automating aspect ratio size

Hey all,

Just like to say hi, thins is my first post here, I've been wracking my brains over this one. I need to take 100s of jpegs of different sizes and have an action or AppleScript crop them to a specific aspect ratio, say for example 4:3. But I want it to do this regardless of pixel size. So the script would look at the width and then crop the height accordingly to make 4:3

Any ideas anyone?

Thanks in advance.

Scott
Reply With Quote top
  #2  
Old 04-20-2017, 12:48 PM
Sabrina81 Sabrina81 is offline
Member
 
Join Date: Jan 2017
Posts: 48
Re: Automating aspect ratio size

In Photoshop, with the crop tool set to 4:3 ratio, create an action that crops an image. Then create a Droplet to batch process your images.
Reply With Quote top
  #3  
Old 04-20-2017, 02:38 PM
Damo77's Avatar
Damo77 Damo77 is offline
Senior Member
 
Join Date: Jul 2007
Location: Brisbane, Australia
Posts: 207
Re: Automating aspect ratio size

This is very risky. Cropping in automation carries a huge risk of losing important detail.
Reply With Quote top
  #4  
Old 04-20-2017, 03:07 PM
Sabrina81 Sabrina81 is offline
Member
 
Join Date: Jan 2017
Posts: 48
Re: Automating aspect ratio size

Quote:
Originally Posted by Damo77 View Post
This is very risky. Cropping in automation carries a huge risk of losing important detail.
No risk. When you create the droplet, specify a destination folder that is different from the source folder. When the droplet runs, it will save the cropped images as copies in that destination folder.
Reply With Quote top
  #5  
Old 04-20-2017, 03:20 PM
Tony W's Avatar
Tony W Tony W is online now
Senior Member
Patron
 
Join Date: Mar 2010
Posts: 1,382
Re: Automating aspect ratio size

I agree with Damo77 auto cropping runs the risk of losing image info that you would normally want to keep. How would a script be able to decide what portion to delete after the initial size by largest dimensions made?

Your script would need to recognise when an image was in either landscape or portrait format and alternate between 4:3 and 3:4 ratio.

Not suggesting that it cannot be done, but I suspect not a trivial task. Hope that someone with scripting experience will step forward and demonstrate how
Reply With Quote top
  #6  
Old 04-20-2017, 03:26 PM
Sabrina81 Sabrina81 is offline
Member
 
Join Date: Jan 2017
Posts: 48
Re: Automating aspect ratio size

Quote:
Originally Posted by Tony W View Post
I agree with Damo77 auto cropping runs the risk of losing image info that you would normally want to keep.
After experimenting, I don't think the Droplet method that I suggested would work very well.

As to risk, there is none if you set up the automated method to save a copy in a different folder. The only risk is that you'd get some crops that aren't satisfactory -- which I think is likely.
Reply With Quote top
  #7  
Old 04-20-2017, 04:03 PM
Tony W's Avatar
Tony W Tony W is online now
Senior Member
Patron
 
Join Date: Mar 2010
Posts: 1,382
Re: Automating aspect ratio size

Quote:
Originally Posted by Sabrina81 View Post
...The only risk is that you'd get some crops that aren't satisfactory -- which I think is likely.
And that is the risk it is nothing to do with file security as you will be outputting to a different folder or have created duplicates to work on.

The method you suggested did not take into account a number of variables

We do not know what size or aspect ratio the existing files are. Some may be portrait some may be landscape where do we place the crop to far left or far right or in the middle for landscape. Middle, top or bottom for portrait. What if the crop is 5:4 or 4:5 making it worse for image area loss.

Attached is perhaps a best case scenario (i.e.losing least amount of image). Original images 3:2, 2:3 ratio (35mm FF digital) where do I want the crop box and how do I get some form intelligence into the script?
In either of these cases you may argue the crop trivial but I can imagine in the landscape wanting to include more of the tree on the right or even exclude it entirely.
Attached Images
File Type: jpg Ratio_3_4.jpg (89.9 KB, 7 views)
File Type: jpg Ratio_4_3.jpg (114.1 KB, 7 views)
Reply With Quote top
  #8  
Old 04-20-2017, 04:56 PM
andrewrodney's Avatar
andrewrodney andrewrodney is offline
Senior Member
 
Join Date: May 2010
Location: Santa Fe
Posts: 1,075
Re: Automating aspect ratio size

FAR better tool than Photoshop to do this: Lightroom! Faster, totally non destructive, I copy and paste cropping all the time on multiple images, then if off, just move those few manually without losing anything data wise (or time wise).
Reply With Quote top
  #9  
Old 04-20-2017, 05:12 PM
Sabrina81 Sabrina81 is offline
Member
 
Join Date: Jan 2017
Posts: 48
Re: Automating aspect ratio size

Quote:
Originally Posted by Shot8un View Post
Hey all,

Just like to say hi, thins is my first post here, I've been wracking my brains over this one. I need to take 100s of jpegs of different sizes and have an action or AppleScript crop them to a specific aspect ratio, say for example 4:3. But I want it to do this regardless of pixel size. So the script would look at the width and then crop the height accordingly to make 4:3

Any ideas anyone?

Thanks in advance.

Scott
Would you care to weigh in with some additional information in light of the replies you've received so far?

You specified one aspect ratio -- 4:3. That ratio is landscape mode (aspect ratios are typically expressed WIDTH:HEIGHT). Are all of your images in landscape mode? Or are some in portrait mode? If you want them cropped to portrait mode, that would be 3:4, so your automated method would have to distinguish between portrait and landscape mode.

A lot of people here are trying to help you. Would you do us the courtesy of replying? Thanks.
Reply With Quote top
  #10  
Old 04-21-2017, 01:52 AM
Shot8un Shot8un is offline
Junior Member
 
Join Date: Mar 2017
Posts: 3
Re: Automating aspect ratio size

Morning all,

Thank you all for your suggestions. This is a little more complicated than it sounds.
I at first assumed that a simple droplet action would work but it doesn't.
The action (on setup) records the pixel dimensions of the setup image and then applies them to everything you run the droplet on.
The images are all landscape but different pixel dimensions, so I needed the action/script to take the longest edge and calculate the hight variable to make the image a specific aspect ratio.
I've found the solution (finally) in a java script that can be built into a droplet/action to do the cropping.

Thanks to everyone who commented

Scott

Last edited by Shot8un; 04-21-2017 at 02:02 AM.
Reply With Quote top
Reply

  RetouchPRO > Technique > Photo Retouching


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resizing images for RetouchPRO jeaniesa Photo Retouching 19 11-05-2016 08:28 PM
Image Size Rex Photoshop Help 13 11-29-2014 12:07 PM
Printing: custom size, full bleed spread Epson Mac settings? NickBurchell Input/Output/Workflow 3 05-14-2013 06:59 AM
Photoshop: Keeping original aspect ratio when cropping in ACR santoro80 Software 0 10-22-2012 01:43 PM
How to size things in Photoshop? sirrduke2010 Photoshop Help 5 01-15-2011 02:26 AM


All times are GMT -6. The time now is 02:35 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Copyright © 2016 Doug Nelson. All Rights Reserved