I need a script written on top of ImageMagick's Convert ([url removed, login to view]) that will resize an image to 160x160 and retain the aspect ratio.
1. If its already a square, simply resize to 160x160
2. Too Tall - If you resize the height to 160, then the width is less than 160. You''ll need to crop this properly and resize.
3. Too wide - If you resize the width to 160, then the height is less than 160. You'll need to crop this properly and resize.
I need this all to be done via a script that uses Convert.