I have hundreds of jpgs of varying sizes (e.g. 2304px x 2323px).
In gimp I can use a batch filter to change these to certain sizes, relative or absolute. But for some configurations I have to do the following manually, which for all the images takes forever:
- Change the size of the shortest side to 500px, maintaining the aspect ratio so the longer side is at least 500px. So if the image was 1000 x 1200, it will now be 500 x 600. The images come in both portrait and landscape.
- Change the canvas size so the image is a 500px x 500px square, centered. This will cut off part of the image (which is fine, most images are almost square anyway).
- Export the file with a -s appended to the file name.
Is there a script I can use to automate these steps?