fine-uploader
fine-uploader copied to clipboard
Specify both a max width and height when scaling
Hi,
Say there is a site that has a "fixed" image placeholder of 640 (w) x 480 (h).
If I set scaling.sizes: maxSize option to 640 and upload a 5500 (w) x 3010 (h) image; it will be scaled to 640 (w) x 350(h). This is OK as it doesn't go over the website placeholder max width. But if I upload a 3010 (w) x 5500 (h) image; it will be scaled to 350 (w) x 640 (h). That means it goes over the image placeholder max height. It should be scaled to 263 (w) x 480 (h).
So is it possible to set max width AND height?
Thanks
We can probably address this by adding checking for a maxWidth or a maxHeight option if maxSize does not exist. However, we will have to take into account the image orientation based on the EXIF data before acting on either of these new options. Seems like this won't be terribly difficult, but the scaling feature is complex enough that a lot of other issues could appear as a result of this change, along with other unexpected challenges.
At the moment, this is a low-priority feature as it has only been requested by one user and I don't see this as an exceptionally important adjustment. As such, I don't have a planned release date or version at the moment.
Fair enough. You have already done an amazing job. So thanks a lot.
Just a bump to this, I see it's added as a low priority but it would be really great to specify max width and max height separately.