I need to scale image in Drupal 7. IF the width is greater than the height, THEN scale the image to 200px height. IF the height is greater than the width, THEN scale the image to 200px width. and if the width and height are the same, scale to 200x200. Please help me out.
I believe this module will do the trick:
- Aspect Switcher - lets you perform different actions or use different dimensions based on whether the image is 'landscape' or 'portrait'
You can use Image style Configuration » Media » Image styles. Add new image style and add scale property to it. Apply that image style to image field.