Need a script/button to batch resize/convert images based on height

Hello! Here I am again with an annoying requests (if you can help me).

Basically, I'd like a button doing the following:

  1. Open a dialog to let me select a folder.
  2. Search all image files (*.jpg, *.jpeg, .*tif, *.bmp) inside that folder and subfolders.
  3. Check if a image height is over 1080 pixels then:
    a) If the image length is less than 1920 pixels just convert the image into .jpg 100% quality (if already jpg do nothing)
    b) If the image length is more than 1920 pixels, convert the image into 1920x1080 .jpg leaving the quality untouched.
  4. Repeat for all images.

The important thing is that everytime I'd need not to create a second image, but replace the original one. Maybe this can be done in three passages: 1) Save with another name - 2) Delete the original file - 3) Rename the new file as the old one.

Thank you!

Have a look at the Image command:!Documents/Image.htm

It should cover all your needs.

1 Like