Reputation: 13
I would like to render all images with the same size even those which are to small.
If I render bigger images like this: ?width=768&height=365&mode=crop
it would be fine but not for the small images.
When I add the scale=canvas
property the bigger Images are zoomed in. Can I somehow prevent this behavior?
See examples bellow:
?width=768&height=365&mode=crop
?width=768&height=365&mode=crop&scale=canvas
?width=768&height=365&mode=crop&scale=canvas
?width=768&height=365&mode=crop
Upvotes: 1
Views: 171
Reputation: 16468
mode=crop
and mode=pad&scale=canvas
offer two mutually exclusive ways to resolve an aspect ratio difference between the image itself and what you're asking for.
mode=crop
-> Removes datamode=pad
-> Adds space to resolve aspect ratio difference.scale=canvas
-> Adds blank space if the image is smaller than requestedWe should have tested how mode=crop
and scale=canvas
interact, but we didn't. The behavior here is completely undefined.
Upvotes: 1