From 35a4ea59c6f258afa1be3d7199f4d59075bdfa46 Mon Sep 17 00:00:00 2001 From: "Mayr, Hannes" <hannes.mayr@stud.tu-darmstadt.de> Date: Sat, 2 Sep 2023 12:35:05 +0200 Subject: [PATCH] Switch from ANTIALIAS to LANCZOS since it is deprecated in Pillow 10. --- plotid/tagplot_image.py | 2 +- plotid/tagplot_matplotlib.py | 2 +- requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plotid/tagplot_image.py b/plotid/tagplot_image.py index 1490515..2f19bf8 100644 --- a/plotid/tagplot_image.py +++ b/plotid/tagplot_image.py @@ -92,7 +92,7 @@ def tagplot_image(plotid_object: PlotOptions) -> PlotIDTransfer: if plotid_object.qrcode: qrcode = create_qrcode(img_id) qrcode.thumbnail( - (plotid_object.qr_size, plotid_object.qr_size), Image.ANTIALIAS + (plotid_object.qr_size, plotid_object.qr_size), Image.LANCZOS ) img.paste( qrcode, diff --git a/plotid/tagplot_matplotlib.py b/plotid/tagplot_matplotlib.py index c81ef3f..1fef2f0 100644 --- a/plotid/tagplot_matplotlib.py +++ b/plotid/tagplot_matplotlib.py @@ -75,7 +75,7 @@ def tagplot_matplotlib(plotid_object: PlotOptions) -> PlotIDTransfer: if plotid_object.qrcode: qrcode = create_qrcode(fig_id) qrcode.thumbnail( - (plotid_object.qr_size, plotid_object.qr_size), Image.ANTIALIAS + (plotid_object.qr_size, plotid_object.qr_size), Image.LANCZOS ) fig.figimage( qrcode, diff --git a/requirements.txt b/requirements.txt index daf6bc1..0b16fec 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ matplotlib==3.6.3 myst-parser==0.18.0 numpy==1.24.2 packaging==23.0 -Pillow==9.4.0 +Pillow==10.0.0 pyparsing==3.0.9 python-dateutil==2.8.2 qrcode==7.4.2 -- GitLab