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

Today, thumbnailator doesn't permit to create a thumbnail keeping aspect ratio AND forcing a defined size #24

Closed
GoogleCodeExporter opened this issue Jul 25, 2015 · 15 comments

Comments

@GoogleCodeExporter
Copy link

I need to create thumbnails similar to the Facebook ones. What Facebook do is 
maintain the aspect ratio, but forcing a defined size of thumbnail.

It resizes the image to the defined size and then cuts what is left, forcing 
the height or the width (and avoiding blank spaces around the image). For me is 
the best approach when we talk about thumbnails.

I tried to use something like this:

Thumbnails.of(myInputStream).forceSize(width, 
height).keepAspectRatio(true).outputFormat("jpg").outputQuality(1.0f).toOutputSt
ream(myOutputStream);

But it does not work. I think this approach is not possible yet with 
thumbnailator so can you implement it? Just a suggestion to make this library 
even better (it is definately the best and simplest all over the web).

Thanks in advance.

Original issue reported on code.google.com by lua...@gmail.com on 13 Oct 2011 at 8:06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant