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.
Resize multiple images of different sizes to same size
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Resize multiple images of different sizes to same size
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.
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.