letterbox images that need to fit
In the current implementation, if an image needs to fit a given w/h, and its original aspect ratio is not similar to the requested, either the resulting w or h will be less, to keep the aspect ratio. However, sometimes (e.g. in e-mails) it is required to have a constant w and h. The resulting "void" can be painted white. This is known as letterboxing.
We’ll close this UserVoice forum, this issue can now be tracked at https://github.com/andrieslouw/imagesweserv/issues/80
Marc Selman commented
V2 is already released, but this feature is not available. When can we expect it?
This would help a lot, thanks in advance!
You already have a great api and letterboxing would help a lot with small images.
Please implement this feature, thanks!
Cool! A parameter for the background color would be even better. I'd suggest the default to be white. (Since transparent isn't possible for jpg images.)