Description
letterbox images that need to fit [9495519]
Submitted by bvarent on 26-8-2015 0:00:00
54 votes on UserVoice prior to migration
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.
Response
by Andries Louw Wolthuizen on 4-2-2017 0:00:00
Letterboxing with bgcolor support is planned for our newest API, which enables more features. The new API has not yet been released, and is still in progress. We’re still working on the implementation of libvips in all our scripts and systems, which needs extensive testing. Some of our servers also need upgrades to make the transition easy and straightforward. I’m sorry for the delays, we’re working hard to keep the service free. Uptime, speed & reliability has prioritiy over the fast introduction of new features. All help on libvips for PHP is appreciated, if you’re looking into ways to help us (and others).
Comments
Comment by bvarent on 10-11-2015 8:09:00
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.)
Comment by Robert on 3-11-2016 14:31:00
You already have a great api and letterboxing would help a lot with small images.
Please implement this feature, thanks!
Comment by umaster on 9-12-2016 13:33:00
This would help a lot, thanks in advance!
Comment by Marc Selman on 12-1-2017 12:31:00
V2 is already released, but this feature is not available. When can we expect it?