I have a directory of images that I need to scale them down. I need to maintain the aspect ratio, and at the same time have a predefined width and height so basically I need to fit it in a letter box.
For example, I have this image: Original image
Which I scaled down to this: Scaled image
Is there any application that can do that in Linux? I found online apps but they do a single image at a time which does not scale with the number of images that I have.
I can do that in Python as well by using:
scipy.misc.imresize(img, [width, height])
but this loses the ratio as well.