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

New logic for Image->fit() #2150

Merged
merged 1 commit into from
Aug 20, 2019
Merged

Conversation

MGatner
Copy link
Member

@MGatner MGatner commented Aug 20, 2019

Description
Current fit() isn't working as expected - it does the correct crop location and resize but it is taking a much smaller-than-necessary crop from large images. This iteration starts with the premise that the crop should be the entire width or height of the image, calculates the other axis based on the desired aspect, takes the much larger crop then resizes to the desired output.

Tests are hard for image handlers but I have run this through a handful of scenarios.

Checklist:

  • Securely signed commits
  • Component(s) with PHPdocs
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@lonnieezell lonnieezell merged commit b889831 into codeigniter4:develop Aug 20, 2019
@MGatner MGatner deleted the image-fit branch August 20, 2019 10:43
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.

2 participants