Replaced PIL's deprecated constant ANTIALIAS with LANCZOS

This commit is contained in:
PySimpleGUI 2023-10-05 16:11:51 -04:00
parent ddebd7a5c6
commit 3776730709
13 changed files with 16 additions and 16 deletions

View file

@ -15,7 +15,7 @@ button64 = 'iVBORw0KGgoAAAANSUhEUgAAAoAAAAFACAMAAAAbEz04AAAABGdBTUEAALGPC/xhBQAA
def image_file_to_bytes(image64, size):
image_file = io.BytesIO(base64.b64decode(image64))
img = Image.open(image_file)
img.thumbnail(size, Image.ANTIALIAS)
img.thumbnail(size, Image.LANCZOS)
bio = io.BytesIO()
img.save(bio, format='PNG')
imgbytes = bio.getvalue()