Batch process: how to scale images without enlarging small ones?

New Here ,
Apr 08, 2022 Apr 08, 2022

Copy link to clipboard

Copied

Hello,

I am a beginner on Photoshop.

I need to resize several thousand images contained in a directory. These images are of all sizes, from 150x150px to 6000x4000px
To lighten them for publication on a website, I don't want these images to exceed 1500px wide.

 

Fireworks allowed me to do a batch process that only resized images larger than the desired size.

How can I do the same thing with Photoshop?

 

In Photoshop, the script for resizing images via File > Scripts > Image Processor transforms all images to the specified size, even the smallest.

You would probably have to build an action for this, but I have no idea how to do it... It's a pity that this function, which seems basic to me, doesn't exist on Photoshop.

 

The Adobe support didn't know how to answer this question...

Thank you in advance for your help,

Phil

 

TOPICS
Actions and scripting , Windows

Views

87

Likes

Translate

Translate

Report

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 Professional ,
Apr 08, 2022 Apr 08, 2022

Copy link to clipboard

Copied

Is File > Automate > Fit Image 1500 x 1500 with Don’t Enlarge checked what you are after? This can be recorded into an action and used with Batch or IP or IPP scripts.

 

 

Likes

Translate

Translate

Report

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
New Here ,
Apr 08, 2022 Apr 08, 2022

Copy link to clipboard

Copied

You're right, this seems the good way!

Do you know a tutorial explaining how to build an action with that kind of steps:

  1. open an image,
  2. rescale it the way you propose
  3. export it as a 75% jpg file

I've never write such automation.
Thanks for your help

Likes

Translate

Translate

Report

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
LEGEND ,
Apr 08, 2022 Apr 08, 2022

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

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 Professional ,
Apr 08, 2022 Apr 08, 2022

Copy link to clipboard

Copied

LATEST

@Phil.Marty wrote:

You're right, this seems the good way!

Do you know a tutorial explaining how to build an action with that kind of steps:

  1. open an image,
  2. rescale it the way you propose
  3. export it as a 75% jpg file

I've never write such automation.
Thanks for your help


 

Using the built-in Image Processor script, or the 3rd party add-on Image Processor Pro.zip  or Picture Processor scripts, one does not need to record the opening or saving into the action, as the script does that for you. If using the Automate > Batch command, then opening and saving does need to be recorded into the action and then the Batch command uses override for the recorded open and save paths.

 

So presuming the use of a script that will perform the opening and saving, the action is pretty simple.

 

1) Start with an open test image that is larger than 1500x1500px

 

2) Create a new action set and start recording a new action:

record-atn.png

 

3) Go to File > Automate > Fit Image... set the parameters as previously mentioned and press OK:

fitimage.png

 

4) Stop recording the action:

stop-recording.png

 

5) Go to File > Scripts > Image Processor and configure, similar to:

image-processor.png

 

6) Enjoy!

 

EDIT: I forgot to mention that one does not need to fit image to a square, if the width is the key deciding factor in the fit image step, just make the height the maximum of 30,000 px or 300,000 px depending on your version.

Likes

Translate

Translate

Report

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