7
votes

I'm currently using this command to resize images using imagemagick:

 convert \( ${files[0]} ${files[1]} -append \) \( ${files[2]} ${files[3]} -append \) +append $dir.jpg

enter image description here

What is the best way to deal with images which dimensions differ like in the second picture? can I specify specific width or height and make the image resize and crop to that size if its smaller and crop the center if its really hight so I always get the result like in first picture?

Thanks!

1

1 Answers

4
votes

Try to resize the image to the same size.

for i in *.jpg; do convert $i -resize 80x80 -quality 90 $i.jpg; done

Now you can append images.

Appending images before resizing

enter image description here

Appending images after resizing

enter image description here