Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

letterbox images that need to fit #80

Closed
kleisauke opened this issue Feb 12, 2017 · 5 comments
Closed

letterbox images that need to fit #80

kleisauke opened this issue Feb 12, 2017 · 5 comments
Assignees
Labels
completed Feature or request has been completed enhancement New feature or request
Milestone

Comments

@kleisauke
Copy link
Member

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?

Original UserVoice Submission

@kleisauke kleisauke added the planned Feature or request is planned label Feb 12, 2017
@kleisauke kleisauke added this to the v3.0.0 milestone Feb 12, 2017
@andrieslouw
Copy link
Member

See #81

@marcselman
Copy link

Awesome that this is going to be implemented.
Maybe make transparency available for png images and fallback to white (or another defined color) for jpg images.

@andrieslouw andrieslouw added completed Feature or request has been completed and removed planned Feature or request is planned labels Mar 28, 2017
@andrieslouw
Copy link
Member

andrieslouw commented Mar 28, 2017

@andrieslouw andrieslouw added the enhancement New feature or request label Mar 28, 2017
@ndavoust
Copy link

Hi, is there a way to have letterbox (adding margins to fit the requested ratio) but without oversampling the image if the requested size is larger than that of the original?

@andrieslouw
Copy link
Member

@ndavoust : I created a new issue for your question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed Feature or request has been completed enhancement New feature or request
Development

No branches or pull requests

4 participants