Skip to content

Commit

Permalink
Fix Pillow 10.0 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jace committed Aug 8, 2023
1 parent 1a104b4 commit a55ca9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hgtv/uploads.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def resize_image(requestfile, maxsize=(320, 240)):
img = Image.open(requestfile)
img.load()
if img.size[0] > maxsize[0] or img.size[1] > maxsize[1]:
img.thumbnail(maxsize, Image.ANTIALIAS)
img.thumbnail(maxsize, Image.LANCZOS)
boximg = Image.new('RGBA', (img.size[0], img.size[1]), (255, 255, 255, 0))
boximg.paste(img, (0, 0))
savefile = BytesIO()
Expand Down

0 comments on commit a55ca9c

Please sign in to comment.