Specify a fixed dimension and a maximum for the other dimension
Hi there,
I had a look at your solution and it looks like exactly what I need to replace some custom code which has caused issues in the past (50% cpu load being image resizing on server).
However I cant see how to replicate my functionality of supplying a fixed dimension and a maximum dimension.
For example when I want an image to be 200px wide but no more than 400px tall I would use the following.
getimage/?id=4&w=200&mh=400
This handler would then...
Resize the image to be 200px wide.
Then check if the image was over 400px tall
If it is > 400px tall resize so it is 400px tall.
So in effect it is saying - resize to given width though if the image is still over the maximum height then size on height instead.
This is for the edge case when some one may upload an extremely tall or wide image and allows me to prioritize which dimension I would ideally like to fix the image to.
Hope this makes sense.
Cheers
Steve
This functionality has existed for years with &width=x&maxheight=Y etc.
-
Is ?width=x&maxheight=y not working as you expect?