I am using the scale function of CID to deliver images cropped to a specific aspect ratio, in order that they 'fit' in a certain web design. For example if I want to have a 'hero' image on certain pages with an aspect ratio of 3.3. I use the width as 1024 and height as 1024/3.3 = 310:
This works fine if the source image is larger than the dimensions I provide in the URL, but if one or both of the dimensions of the source image is smaller than those I provide, I get an image back which has a different aspect ratio.
For example if my source image happens to be 960 x 460 px, then I get an image back that is 960 x 310 px.
This 'breaks' the design. Not because the image width is too small (the design takes care that the image is stretched to fit the whole screen width) but because the aspect ratio is wrong (its 3.1 instead of 3.3)
So the question is, can I (without knowing up front the size of the source image) get CID to always return an image of the required aspect ratio?