I want to create thumbnails for all images of a folder. I also want the images to fit in a square of 100x100 pixels.
So after scaling the images down, while the smaller side needs to be 100 pixels, the larger side should be cropped so as to make it equal to 100.
With ImageMagick I have tried:
for i in $(ls *.jpg); do convert -scale 100 $i th-$i; done
It works but for an example image of 1000x800, the scaled down image has a size of 100x80 instead of 100x100.
"As of IM v6.3.8-3 a new resize flag '^' will let you do this directly as a single resize step. These examples represent an alternative method that can be used for users with older versions of ImageMagick."
– usmanayubsh Jan 03 '16 at 18:15