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

add filter to perform a relative resize, thus keeping the aspect ratio, and not exceeding a max width and a max height #206

Closed
wants to merge 3 commits into from

Conversation

rjbijl
Copy link

@rjbijl rjbijl commented Jul 18, 2013

No description provided.

@havvg
Copy link
Contributor

havvg commented Jul 18, 2013

Hm.. I'm not into image processing as it, is "two-way resize" a common name reflecting the behavior?

}

$filter = new TwoWayRelativeResize($newHeight, $newWidth);
return $filter->apply($image);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing empty line before return.

@trsteel88
Copy link
Contributor

This is a duplicate filter isn't it? The thumbnail filter can already do this with mode "inset"

thumbnail: { size: [270, 185], mode: inset }

@rjbijl
Copy link
Author

rjbijl commented Jul 18, 2013

@trsteel88 you seem to be correct... I tested that option yesterday, but then it didn't seem to do that. Tried again just now, and it indeed works. Guess I got cache-raped...

So nevermind, I'll close this one

@rjbijl rjbijl closed this Jul 18, 2013
@lsmith77
Copy link
Contributor

if this was unclear .. maybe the docs can be improved?

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.

4 participants