Skip to content

Commit

Permalink
use Image.LANCZOS instead of Image.ANTIALIAS(deprecated) for creating…
Browse files Browse the repository at this point in the history
… the thumbnails
  • Loading branch information
melizeche committed Nov 29, 2023
1 parent be852a5 commit f7e0c31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def create_thumbnail(imagepath: str, basewidth: int, force=False) -> bool:
img = Image.open(imagepath)
wpercent = basewidth / float(img.size[0])
hsize = int((float(img.size[1]) * float(wpercent)))
img = img.resize((basewidth, hsize), Image.ANTIALIAS)
img = img.resize((basewidth, hsize), Image.LANCZOS)
thumbfilename = "{}_th{}".format(
path.splitext(imagepath)[0],
path.splitext(imagepath)[1],
Expand Down

0 comments on commit f7e0c31

Please sign in to comment.