mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Fix thumbnail scaling of portrait pictures
This commit is contained in:
@@ -32,7 +32,7 @@ def get_sizes(size, imgsize):
|
||||
(0, int((imgsize[1] * wfactor - imgsize[1] * hfactor) / 2),
|
||||
imgsize[0] * hfactor, int((imgsize[1] * wfactor + imgsize[1] * wfactor) / 2))
|
||||
elif wfactor > hfactor:
|
||||
return (int(size[0]), int(imgsize[1] * hfactor)), \
|
||||
return (int(size[0]), int(imgsize[1] * wfactor)), \
|
||||
(0, int((imgsize[1] * wfactor - size[1]) / 2), size[0], int((imgsize[1] * wfactor + size[1]) / 2))
|
||||
else:
|
||||
return (int(imgsize[0] * hfactor), int(size[1])), \
|
||||
|
||||
Reference in New Issue
Block a user