I’m looking for a function that will take in an Image object, a min width and a min height it will return a size object (or any other object with a width and a height property) with the new dimensions of the image.
For example if I passed an image that has original dimensions of:
1024×768 (width x height)
into this function with:
minimum width: 256, minimum height: 206
The function would return a size object:
new width: 274, new height: 206
This allows an image to fill a space while preserving the aspect ratio of the image.
Thanks for any help anyone can give.
Cheers,
Chris
Pretty easy. Why could not you do it yourself? oO