Reputation: 9498
I want to display a 1920px by 335px version of user provided images on a web site, using ImageResizer v4.
I would like to use cropping in case the image is larger than the given dimensions, but padding if it is smaller, and in between I would like to shrink the image and add padding to achieve the target dimensions.
I know I can do cropping using ?w=1920&h=335&mode=crop
but it won't reach the target dimensions if it is too small. Adding &scale=up
will not look good on small images because the image is then first scaled up and then cropped.
On the other hand, using padding I would give away a lot of image pixels in case of large source images, when I could really crop them (down) to the target size.
Can anybody advise?
Upvotes: 0
Views: 44