Replaced PIL's deprecated constant ANTIALIAS with LANCZOS
This commit is contained in:
parent
ddebd7a5c6
commit
3776730709
13 changed files with 16 additions and 16 deletions
|
@ -56,7 +56,7 @@ def convert_to_bytes(file_or_bytes, resize=None, fill=False):
|
|||
if resize:
|
||||
new_width, new_height = resize
|
||||
scale = min(new_height / cur_height, new_width / cur_width)
|
||||
img = img.resize((int(cur_width * scale), int(cur_height * scale)), PIL.Image.ANTIALIAS)
|
||||
img = img.resize((int(cur_width * scale), int(cur_height * scale)), PIL. Image.LANCZOS)
|
||||
if fill:
|
||||
img = make_square(img, THUMBNAIL_SIZE[0])
|
||||
with io.BytesIO() as bio:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue