-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Thumbnail width for portrait images #71
Comments
This is a known issue in libvips. See libvips/libvips#709 for a future possible enhancement.
Indeed, you can set the target resize height to
You could use |
Thanks for the info, it solves the problem. Just a suggestion. Maybe you could write a similar note in the method summary, and/or define public constant |
This is to prevent reduction in the vertical axis when the height is omitted. See: kleisauke/net-vips#71.
This to prevent reduction in the vertical axis when the height is omitted. See: kleisauke/net-vips#71.
See libvips/libvips#1639 for a draft that changes the |
ThumbnailImage
method allows a user to specify only width, but it does not work correctly for portrait images (or it is not correctly documented)For example, if you write the following code
for the image with dimensions 600x900 then it would produce 200x300 thumbnail instead of 300x450.
It appears that it translates to
vipsthumbnail.exe -s 300
instead tovipsthumbnail.exe -s 300x
A workaround is to calculate height or to give some large value for height
Image thumbnail = image.ThumbnailImage(300, height: a big enough number)
The text was updated successfully, but these errors were encountered: