A
A
Alexander2016-04-15 11:41:55
Django
Alexander, 2016-04-15 11:41:55

Why doesn't PIL crop the image by height?

temp.thumbnail((400, 400), Image.ANTIALIAS)
The dimensions of the original picture are 1366x910. After cropping, the image was changed to 400x266, although I indicated 400, 400

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
asd111, 2016-04-15
@kentuck1213

size = (400, 400)
thumb = ImageOps.fit(temp, size, Image.ANTIALIAS)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question