Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Smart cropping sometimes has the wrong dimensions #646

Open
ataylor32 opened this issue Aug 28, 2020 · 0 comments
Open

Smart cropping sometimes has the wrong dimensions #646

ataylor32 opened this issue Aug 28, 2020 · 0 comments

Comments

@ataylor32
Copy link

ataylor32 commented Aug 28, 2020

This is what I'm running (the image is from here):

from sorl.thumbnail.shortcuts import get_thumbnail
thumbnail = get_thumbnail(
    'https://upload.wikimedia.org/wikipedia/commons/0/09/Closing_panel_of_PyCon_Asia_Pacific%2C_Ngee_Ann_Kongsi_Auditorium%2C_Singapore_Management_University_-_20100611.jpg',
    '200x200',
    crop='smart',
)
print(thumbnail.size)

This is the output:

[30, 200]

This is what I would expect the output to be:

[200, 200]

This is what I have installed:

Django==3.1
Pillow==7.2.0
sorl-thumbnail==12.6.3
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant