Copy link to clipboard
Copied
Hello! Do someone know if it is possible to resize multiple images with a script even through they have different sizes?
If the goal is a standard size, File > Automate > Fit Image is what you want for this. It can be used in actions, a script is not necessary.
It will work on both portrait and landscape, resizing the longest side. It can either enlarge if applicable, or not.
Copy link to clipboard
Copied
Yes, it is possible. But you need to define the criteria. How will the final size be determined?
Copy link to clipboard
Copied
If the goal is a standard size, File > Automate > Fit Image is what you want for this. It can be used in actions, a script is not necessary.
It will work on both portrait and landscape, resizing the longest side. It can either enlarge if applicable, or not.
Copy link to clipboard
Copied
Thank you very much! It seems to work well!
Copy link to clipboard
Copied
I need to process a bunch of images and based on which dimension is larger, the width or the height, I need to resize the larger dimension to 800 pixels and have the other dimension auto-calculate to some number. How is this achieved? I looked at the File...Automate....Fit Image, and I see the contrain within boxes. If I specify 80o pixles in both boxes, will this process only set the larger dimension to 800? I guess I can give it a try while I wait for your response.
Copy link to clipboard
Copied
I tried creating an action to Fit the Image within 800 x 800 pixels and then get the canvas size to 800 x 800 pixels and then save as PNG. When I look at the output folder, the images are not being saved as 800 x 800. I suspect the canvas size is not working.
Copy link to clipboard
Copied
I tried creating an action to Fit the Image within 800 x 800 pixels and then get the canvas size to 800 x 800 pixels and then save as PNG. When I look at the output folder, the images are not being saved as 800 x 800. I suspect the canvas size is not working.
By @DDmUSA
When set to 800x800px, the longest edge will be resized to 800px, with the shortest edge proportionally smaller.
What size is the original? What is the size after fit image?
Copy link to clipboard
Copied
You can use the Pillow (PIL) library to resize multiple images in a folder, regardless of their original sizes.
✔ This script resizes all images in the images/ folder and saves them to resized_images/.
If you prefer OpenCV, use the following script:
If you prefer a command-line approach, ImageMagick can resize all images in a folder:
✔ This command resizes all .jpg images in the images/ folder and saves them to resized_images/.
:white_heavy_check_mark: Python (PIL or OpenCV) – Best for automation in scripts or web applications.
:white_heavy_check_mark: ImageMagick – Fastest for bulk resizing via command line
Find more inspiration, events, and resources on the new Adobe Community
Explore Now