Closed brianjbuck closed 9 years ago
Hey, @brianjbuck! Thanks for the PR, but how is this different than just passing the same dimension for the width and height? For example, Thumbnail(400, 400)
.
Your example creates a square even if the input is a rectangle. I don't want a square. I want to keep a rectangle but I don't know in advance if that rectangle is (400, 200)
or (200, 400)
. This way I can just get back a thumbnail resized by the largest dimension and not worry if that dimension is the width or the height.
Oh, sorry. Like Thumbnail(400, 400, crop=False)
?
Ah, I see. It was unclear from the documentation what crop=False
would do. In that case I suppose we can close the PR. Thanks @matthewwithanm !
No problem. The docs could definitely be improved and I'd be super grateful for a PR for that.
The Thumbnail processor is actually a bit special…it's meant as a kind of "higher order" processor, that just composes a bunch of the other ones in a way that would generally be useful for thumbnails. In your case though, you could probably just use ResizeToFit
directly. It works like CSS's "background-size: contain"—no cropping.
I might look at clarifying some of the docs. Thanks!
:thumbsup: Thank you!
This change provides a way for an image to be scaled proportionally. I may not know if the provided image is portrait or if it is landscape, but I do know that I want to make the largest dimension a certain size without cropping the image.