Skip to content

Commit 2c1dfb4

Browse files
committed
fix deprecated attribute in PIL
1 parent ee04b4f commit 2c1dfb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def resize_avatar(old_file):
111111
# generate thumbnail if the avatar is too large
112112
new_filename = rand_str() + '.png'
113113
try:
114-
img.thumbnail((thumbnail_width, thumbnail_height), Image.ANTIALIAS)
114+
img.thumbnail((thumbnail_width, thumbnail_height), Image.LANCZOS)
115115
img.save(os.path.join(upload_base, new_filename), "PNG")
116116
except IOError:
117117
print("Failed to create thumbnail from '" + old_file + "' to '" + new_filename + "'")

0 commit comments

Comments
 (0)