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
|
@ -60,7 +60,7 @@ def convert_to_bytes(source, size=(None, None), subsample=None, zoom=None, fill=
|
|||
elif zoom is not None:
|
||||
scale = zoom
|
||||
|
||||
resized_image = image.resize((int(width * scale), int(height * scale)), Image.ANTIALIAS) if scale is not None else image
|
||||
resized_image = image.resize((int(width * scale), int(height * scale)), Image.LANCZOS) if scale is not None else image
|
||||
if fill and scale is not None:
|
||||
resized_image = make_square(resized_image)
|
||||
# encode a PNG formatted version of image into BASE64
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue