I am currently using this command to resize images using imagemagick:
convert \( ${files[0]} ${files[1]} -append \) \( ${files[2]} ${files[3]} -append \) +append $dir.jpg

What is the best way to handle images of different sizes, as in the second picture? can I specify a specific width or height and make the image size and crop to this size if it is smaller, and crop the center if its really height, so I always get the result, as in the first image?
Thanks!
source share