Skip to content

Added method resizeToBestFit #26

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

Merged
2 commits merged into from
Jun 22, 2015
Merged

Added method resizeToBestFit #26

2 commits merged into from
Jun 22, 2015

Conversation

Droeftoeter
Copy link
Contributor

Added a method to resize an image to best fit a given set of dimensions
while keeping the original aspect ratio.

Added a method to resize an image to best fit a given set of dimensions
while keeping the original aspect ratio.
@ghost
Copy link

ghost commented May 11, 2015

I think this should resolve what the OP of #24 was trying to achieve, although without chaining.

@ghost
Copy link

ghost commented May 11, 2015

Should it return $this->resize($width, $height, true) or $this->resize($width, $height, $allow_enlarge) or does it not matter?

@Droeftoeter
Copy link
Contributor Author

It doesn't matter, aslong as it's either true or passes the $allow_enlarge on. It already does nothing when both dimensions are smaller than the provided box and allow_enlarge is false.

ghost pushed a commit that referenced this pull request Jun 22, 2015
Added method resizeToBestFit
@ghost ghost merged commit 19a557b into gumlet:master Jun 22, 2015
This pull request was closed.
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

Successfully merging this pull request may close these issues.

1 participant