batch resizing problem

H
Posted By
Hitchkas
Jun 9, 2006
Views
657
Replies
10
Status
Closed
I have problem in a seemingly simple task of batch cropping/resizing of images. All original images are in JPG format, aspect ratio of 3/2 (DSLR ratio), but with different resolutions. For this question assume two sizes of 2464×1648 pixels and 3072×2048 pixels and landscape orientation.

I want to send these images a photo lab for printing. For 6×4 prints the lab requirement is 300 ppi.

For 300 ppi I create an action and set the crop tool to 1800×1200 pixels at 300ppi and save the result as PSD file.

Here is the problem. If I use a 3072×2048 image to create my action, then when cropping 2464×1648 images it simply resizes the canvas size to 1800×1200 with a small image inside the plain canvas. Then if I use a 2464×1648 image to create my action when cropping the 3072×2048 images the result will be a small portion of the image cropped to 1800×1200.

I tried also to simply resize my images to 1800×1200 at 300 ppi, but this time the problem is that 3072×2048 images will scale to 1800×1200/300 ppi, but 2646×1648 images will scale to 1800×1204/300 (an additional 4 pixels to the height) and action fails to execute.

Sorry for the lengthy story, but how do you batch process images with different sizes to an exact size of say 1800×1200/300 ppi for print labs ignoring a slight deviation like cropping out the extra 4 pixels in previous example?

Thanks in advance

Must-have mockup pack for every graphic designer 🔥🔥🔥

Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.

I
inez
Jun 9, 2006
On 6/8/06 7:04 PM, Hitchkas commented:

I have problem in a seemingly simple task of batch cropping/resizing of images. All original images are in JPG format, aspect ratio of 3/2 (DSLR ratio), but with different resolutions. For this question assume two sizes of 2464×1648 pixels and 3072×2048 pixels and landscape orientation.

I want to send these images a photo lab for printing. For 6×4 prints the lab requirement is 300 ppi.

For 300 ppi I create an action and set the crop tool to 1800×1200 pixels at 300ppi and save the result as PSD file.

Here is the problem. If I use a 3072×2048 image to create my action, then when cropping 2464×1648 images it simply resizes the canvas size to 1800×1200 with a small image inside the plain canvas. Then if I use a 2464×1648 image to create my action when cropping the 3072×2048 images the result will be a small portion of the image cropped to 1800×1200.

I tried also to simply resize my images to 1800×1200 at 300 ppi, but this time the problem is that 3072×2048 images will scale to 1800×1200/300 ppi, but 2646×1648 images will scale to 1800×1204/300 (an additional 4 pixels to the height) and action fails to execute.
Sorry for the lengthy story, but how do you batch process images with different sizes to an exact size of say 1800×1200/300 ppi for print labs ignoring a slight deviation like cropping out the extra 4 pixels in previous example?

Can you not separate the images so that one batch can simple be resized while the other batch is cropped then resized?
H
Hitchkas
Jun 9, 2006
inez wrote:
On 6/8/06 7:04 PM, Hitchkas commented:

text snipped <<<

Sorry for the lengthy story, but how do you batch process images with different sizes to an exact size of say 1800×1200/300 ppi for print labs ignoring a slight deviation like cropping out the extra 4 pixels in previous example?

Can you not separate the images so that one batch can simple be resized while the other batch is cropped then resized?

That’s possible but I have to create one action for each size, then I have to separate them in multiple folders based on each size. For few images this will be OK, but with hundreds of picture it will be very time consuming. I was looking for an automated method.

It will be great if there was a resizing option for batch processing similar to what Irafanview has. You set the long side to a fixed size and keep the aspect ratio the same, ignoring slight variations. I don’t want to use another program to resize since I think PhotoShop’s interpolation algorithms are better.
I
inez
Jun 9, 2006
On 6/8/06 8:03 PM, Hitchkas commented:

inez wrote:
On 6/8/06 7:04 PM, Hitchkas commented:

text snipped <<<

Sorry for the lengthy story, but how do you batch process images with different sizes to an exact size of say 1800×1200/300 ppi for print labs ignoring a slight deviation like cropping out the extra 4 pixels in previous example?

Can you not separate the images so that one batch can simple be resized while the other batch is cropped then resized?

That’s possible but I have to create one action for each size, then I have to separate them in multiple folders based on each size. For few images this will be OK, but with hundreds of picture it will be very time consuming. I was looking for an automated method.

It will be great if there was a resizing option for batch processing similar to what Irafanview has. You set the long side to a fixed size and keep the aspect ratio the same, ignoring slight variations. I don’t want to use another program to resize since I think PhotoShop’s interpolation algorithms are better.

Well, it could be done with a double step action, But you’d have to leave resampling on, which may not be optimal. That, ofcourse, would be to set the target height of 4 inches in image size @300ppi, then set canvas size width to 6in. which will crop the odd sized images and do nothing to the others. That would keep things proportional atleast.

Hopefully someone else will come up with something better.
GD
George Dingwall
Jun 9, 2006
On 8 Jun 2006 17:04:59 -0700, "Hitchkas" wrote:

I have problem in a seemingly simple task of batch cropping/resizing of images. All original images are in JPG format, aspect ratio of 3/2 (DSLR ratio), but with different resolutions. For this question assume two sizes of 2464×1648 pixels and 3072×2048 pixels and landscape orientation.

I want to send these images a photo lab for printing. For 6×4 prints the lab requirement is 300 ppi.

For 300 ppi I create an action and set the crop tool to 1800×1200 pixels at 300ppi and save the result as PSD file.

Here is the problem. If I use a 3072×2048 image to create my action, then when cropping 2464×1648 images it simply resizes the canvas size to 1800×1200 with a small image inside the plain canvas. Then if I use a 2464×1648 image to create my action when cropping the 3072×2048 images the result will be a small portion of the image cropped to 1800×1200.

I tried also to simply resize my images to 1800×1200 at 300 ppi, but this time the problem is that 3072×2048 images will scale to 1800×1200/300 ppi, but 2646×1648 images will scale to 1800×1204/300 (an additional 4 pixels to the height) and action fails to execute.
Sorry for the lengthy story, but how do you batch process images with different sizes to an exact size of say 1800×1200/300 ppi for print labs ignoring a slight deviation like cropping out the extra 4 pixels in previous example?

Thanks in advance

Hi there,

I made a small script that will resize images of any size and any orientation to a specified target size of the long side of the image. So in your example, the script will resize both images sizes to 1800 pixels on the longside and resize the short side in proportion, and you end up with images that are 1800 by 1200 + a few pixels due to the fact that the original images are not exactly in the ration of 4 to 3.

If you want a copy, contact me by email and I’ll send you a copy. You can find my email on my website which is shown below.
Bye for now,

George Dingwall

Invergordon, Scotland

http://www.georgedingwall.co.uk
N
nomail
Jun 9, 2006
Hitchkas wrote:

I have problem in a seemingly simple task of batch cropping/resizing of images. All original images are in JPG format, aspect ratio of 3/2 (DSLR ratio), but with different resolutions. For this question assume two sizes of 2464×1648 pixels and 3072×2048 pixels and landscape orientation.

I want to send these images a photo lab for printing. For 6×4 prints the lab requirement is 300 ppi.

For 300 ppi I create an action and set the crop tool to 1800×1200 pixels at 300ppi and save the result as PSD file.

Here is the problem. If I use a 3072×2048 image to create my action, then when cropping 2464×1648 images it simply resizes the canvas size to 1800×1200 with a small image inside the plain canvas. Then if I use a 2464×1648 image to create my action when cropping the 3072×2048 images the result will be a small portion of the image cropped to 1800×1200.

I tried also to simply resize my images to 1800×1200 at 300 ppi, but this time the problem is that 3072×2048 images will scale to 1800×1200/300 ppi, but 2646×1648 images will scale to 1800×1204/300 (an additional 4 pixels to the height) and action fails to execute.
Sorry for the lengthy story, but how do you batch process images with different sizes to an exact size of say 1800×1200/300 ppi for print labs ignoring a slight deviation like cropping out the extra 4 pixels in previous example?

The solution is simple. Use ‘Image Size’ to resize the images to a 1800 pixels on the longest size. Then use ‘Canvas Size’ to crop away those few extra pixels. This can be done in one action.


Johan W. Elzenga johan<<at>>johanfoto.nl Editor / Photographer http://www.johanfoto.nl
I
inez
Jun 9, 2006
On 6/9/06 7:42 AM, Johan W. Elzenga commented:

Hitchkas wrote:

I have problem in a seemingly simple task of batch cropping/resizing of images. All original images are in JPG format, aspect ratio of 3/2 (DSLR ratio), but with different resolutions. For this question assume two sizes of 2464×1648 pixels and 3072×2048 pixels and landscape orientation.

I want to send these images a photo lab for printing. For 6×4 prints the lab requirement is 300 ppi.

For 300 ppi I create an action and set the crop tool to 1800×1200 pixels at 300ppi and save the result as PSD file.

Here is the problem. If I use a 3072×2048 image to create my action, then when cropping 2464×1648 images it simply resizes the canvas size to 1800×1200 with a small image inside the plain canvas. Then if I use a 2464×1648 image to create my action when cropping the 3072×2048 images the result will be a small portion of the image cropped to 1800×1200.

I tried also to simply resize my images to 1800×1200 at 300 ppi, but this time the problem is that 3072×2048 images will scale to 1800×1200/300 ppi, but 2646×1648 images will scale to 1800×1204/300 (an additional 4 pixels to the height) and action fails to execute.
Sorry for the lengthy story, but how do you batch process images with different sizes to an exact size of say 1800×1200/300 ppi for print labs ignoring a slight deviation like cropping out the extra 4 pixels in previous example?

The solution is simple. Use ‘Image Size’ to resize the images to a 1800 pixels on the longest size. Then use ‘Canvas Size’ to crop away those few extra pixels. This can be done in one action.

Nobody pays attention to me:( LOL!

I basically already said that, except that he needs to use the shortest dimension, the height, in image size and then use canvas size to crop the width. If he uses 1800px his 2646X2048 goes below 4" in height.

inez
N
nomail
Jun 9, 2006
inez wrote:

I tried also to simply resize my images to 1800×1200 at 300 ppi, but this time the problem is that 3072×2048 images will scale to 1800×1200/300 ppi, but 2646×1648 images will scale to 1800×1204/300 (an additional 4 pixels to the height) and action fails to execute.
Sorry for the lengthy story, but how do you batch process images with different sizes to an exact size of say 1800×1200/300 ppi for print labs ignoring a slight deviation like cropping out the extra 4 pixels in previous example?

The solution is simple. Use ‘Image Size’ to resize the images to a 1800 pixels on the longest size. Then use ‘Canvas Size’ to crop away those few extra pixels. This can be done in one action.

Nobody pays attention to me:( LOL!

I basically already said that, except that he needs to use the shortest dimension, the height, in image size and then use canvas size to crop the width. If he uses 1800px his 2646X2048 goes below 4" in height.

Maybe we didn’t pay attention because it’s wrong? He doesn’t have 2646×2048 pixels images, only 3072×2048 and 2646×1648 pixels.

Read his post: "3072×2048 images will scale to 1800×1200/300 ppi, but 2646×1648 images will scale to 1800×1204/300 (an additional 4 pixels to the height)." That means he only needs to crop those extra 4 pixels after scaling to 1800 pixels at the longest size.


Johan W. Elzenga johan<<at>>johanfoto.nl Editor / Photographer http://www.johanfoto.nl
I
inez
Jun 9, 2006
On 6/9/06 11:12 AM, Johan W. Elzenga commented:

inez wrote:

I tried also to simply resize my images to 1800×1200 at 300 ppi, but this time the problem is that 3072×2048 images will scale to 1800×1200/300 ppi, but 2646×1648 images will scale to 1800×1204/300 (an additional 4 pixels to the height) and action fails to execute.
Sorry for the lengthy story, but how do you batch process images with different sizes to an exact size of say 1800×1200/300 ppi for print labs ignoring a slight deviation like cropping out the extra 4 pixels in previous example?

The solution is simple. Use ‘Image Size’ to resize the images to a 1800 pixels on the longest size. Then use ‘Canvas Size’ to crop away those few extra pixels. This can be done in one action.

Nobody pays attention to me:( LOL!

I basically already said that, except that he needs to use the shortest dimension, the height, in image size and then use canvas size to crop the width. If he uses 1800px his 2646X2048 goes below 4" in height.

Maybe we didn’t pay attention because it’s wrong? He doesn’t have 2646×2048 pixels images, only 3072×2048 and 2646×1648 pixels.
Read his post: "3072×2048 images will scale to 1800×1200/300 ppi, but 2646×1648 images will scale to 1800×1204/300 (an additional 4 pixels to the height)." That means he only needs to crop those extra 4 pixels after scaling to 1800 pixels at the longest size.

I admit, I miss typed when my eyes roamed. But an 2646×1648 image doesn’t actually scale proportionally to 1800X1204, but to 1800X1121 (3.737" in height). That’s the case in my PS anyway. Maybe my PS is faulty?

inez
I
inez
Jun 9, 2006
On 6/9/06 12:05 PM, inez commented:

Maybe we didn’t pay attention because it’s wrong? He doesn’t have 2646×2048 pixels images, only 3072×2048 and 2646×1648 pixels.
Read his post: "3072×2048 images will scale to 1800×1200/300 ppi, but 2646×1648 images will scale to 1800×1204/300 (an additional 4 pixels to the height)." That means he only needs to crop those extra 4 pixels after scaling to 1800 pixels at the longest size.

I admit, I miss typed when my eyes roamed. But an 2646×1648 image doesn’t actually scale proportionally to 1800X1204, but to 1800X1121 (3.737" in height). That’s the case in my PS anyway. Maybe my PS is faulty?
inez

I get it: his first paragraph says: 2464×1648
But I went by his 5th paragraph 2646×1648

So, yes, use the longest size if the top dimensions are correct:)
H
Hitchkas
Jun 9, 2006
inez wrote:
On 6/9/06 12:05 PM, inez commented:

Maybe we didn’t pay attention because it’s wrong? He doesn’t have 2646×2048 pixels images, only 3072×2048 and 2646×1648 pixels.
Read his post: "3072×2048 images will scale to 1800×1200/300 ppi, but 2646×1648 images will scale to 1800×1204/300 (an additional 4 pixels to the height)." That means he only needs to crop those extra 4 pixels after scaling to 1800 pixels at the longest size.

I admit, I miss typed when my eyes roamed. But an 2646×1648 image doesn’t actually scale proportionally to 1800X1204, but to 1800X1121 (3.737" in height). That’s the case in my PS anyway. Maybe my PS is faulty?
inez

I get it: his first paragraph says: 2464×1648
But I went by his 5th paragraph 2646×1648

So, yes, use the longest size if the top dimensions are correct:)

Thanks everybody for great suggestions. I used the method mentioned here (two steps of resize image, and then resize canvas) achieving result I wanted.

One thing I realized when creating the action for this task was, say when I resize the image to width of 6" and image height becomes exactly 4" as result of this, next step of resizing the canvas height to 4" does not get recorded by the action recorder since it thinks it is an unnecessary action. To bypass this problem, I created a new dummy image with all three variables different from all existing photos such that all the actions get recorded, for example a 6.5×4.5 image at 315 ppi. Using this dummy image I created my action and then applied to all the files.

Thanks again for all your help.

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

Related Discussion Topics

Nice and short text about related topics in discussion sections