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

Specifying only height and calculating width from source ratio #61

Closed
d10v opened this issue Jun 20, 2018 · 1 comment
Closed

Specifying only height and calculating width from source ratio #61

d10v opened this issue Jun 20, 2018 · 1 comment

Comments

@d10v
Copy link
Contributor

d10v commented Jun 20, 2018

Hey, we've hacked a feature to only specify height and calculate width based on source image h/w ratio. It breaks a bit of standard logic though. Are you interested in this?

@d10v d10v changed the title Specifying only height and calculating width from source ration Specifying only height and calculating width from source ratio Jun 20, 2018
@DarthSim
Copy link
Member

Hi Dima,

We use a dirty hack for the similar need (fixed width, various height): specify the desired width and an "impossible" height with fit resize algorithm. 300x9999999 for example. If the image doesn't have a huge aspect ratio, it will always be resized to the width of 300. In your case, you should specify desired height and "impossible" width.

Anyway, if you have a solution for this, I'd like to check it out. PRs are always welcome :)

@rdm rdm mentioned this issue May 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants