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

Create thumbnail for the smallest dimension #1583

Closed
daverupp opened this issue Mar 19, 2020 · 4 comments
Closed

Create thumbnail for the smallest dimension #1583

daverupp opened this issue Mar 19, 2020 · 4 comments

Comments

@daverupp
Copy link

daverupp commented Mar 19, 2020

Hello
I have a question about generating thumbnails with the --size parameter.
As far as I understand, we have to set the box of the thumbnail by {width}x{height} ... or {width}x

Is it possible, to generate thumbnails for the smallest dimension... lets say I define just 320px and libvips will take care to generate thumbnails for landscape (??x320) and for portrait (320x??)

so we have the same quality of generated thumbnails respecting the orientation?

thx for any help

@jcupitt
Copy link
Member

jcupitt commented Mar 19, 2020

You're right, this wasn't possible. I added a smartcrop mode to fix this:

john@kiwi:~/pics$ vipsthumbnail k2.jpg --size 320 --smartcrop all
john@kiwi:~/pics$ vipsheader tn_k2.jpg
tn_k2.jpg: 320x452 uchar, 3 bands, srgb, jpegload

Thanks for the suggestion!

@jcupitt jcupitt closed this as completed Mar 19, 2020
jcupitt added a commit that referenced this issue Mar 19, 2020
So you can crop to fill as well as crop to fit.

see #1583
@daverupp
Copy link
Author

Do you know, when a new Release including latest commits will come?
:)

@jcupitt
Copy link
Member

jcupitt commented Mar 19, 2020

Releases are about every six months, so the next one will be June, I'd guess.

@daverupp
Copy link
Author

daverupp commented Mar 19, 2020

Ok. Thanks again for your quick response, and I am looking forward to the new release.
Stay healthy, keep up the super work and all the best!

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

2 participants