taghawi wrote:Hello,
I have a batch of different sized pictures. I would like to borders to all of them so that the images are the same size at the end.
Thanks
Davoud
If you want to add borders to them all, so that they are all bigger, but the same size, then figure out the largest size that you want them to be and use -extent. Here is an example that will make all the image 500x500 with a white border
convert inputimage -background white -gravity center -extent 500x500 outputimage
see
http://www.imagemagick.org/Usage/crop/#extent
If you have images that are bigger than your final size, then you can shrink only those to that size or smaller and then add your border using -resize WIDTHxHEIGHT>
see
http://www.imagemagick.org/script/comma ... php#resize
http://www.imagemagick.org/script/comma ... p#geometry
So if you wanted it to have a minimum border of 10, then
convert inputimage -resize 490x490> -background white -gravity center -extent 500x500 outputimage