Page 1 of 1

Resize multiple images of different sizes to same size

Posted: 2014-06-01T20:52:36-07:00
by lsilver
I have several hundred photos of different dimensions. I need to create a thumbnail of these images at 100x100.

I don't want to distort the photos so I'll need to add some kind of white space and horizontally/vertically center the image so that any white space would create a uniformed size border in white.

Examples:

Photo 200 x 200 = resized to 100 x 100 with no white space
Photo 300 x 200 = resized to 100 x 100 but proportional would be to 100 x 66.67 so there would need to be 33.33 px of white space added to the height
Photo 200 x 300 = resized to 100 x 100 but proportional would be to 66.67 x 100 so there would need to be 33.33 px of white space added to the width

Is this possible and if so, how?

Thanks.

Re: Resize multiple images of different sizes to same size

Posted: 2014-06-01T22:09:47-07:00
by fmw42
see
http://www.imagemagick.org/Usage/thumbnails/#pad

this uses -thumbnail 100x100 and -gravity center -extent to pad it out

leave off the -define if you do not have jpeg images.

In the future, please always identify your version of IM and platform, since syntax and commands may differ.