From a7e1b94b41f3a6e0f8b365598bc34fb47ca95a6d Mon Sep 17 00:00:00 2001 From: Lennart Haas Date: Wed, 30 Aug 2023 13:37:41 +0200 Subject: [PATCH 1/2] fix: replaced removed Image.ANTIALIAS call with new PIL way --- brother_ql/conversion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brother_ql/conversion.py b/brother_ql/conversion.py index d87ddfe..6bf3b66 100755 --- a/brother_ql/conversion.py +++ b/brother_ql/conversion.py @@ -110,7 +110,7 @@ def convert(qlr, images, label, **kwargs): im = im.resize((im.size[0]//2, im.size[1])) if im.size[0] != dots_printable[0]: hsize = int((dots_printable[0] / im.size[0]) * im.size[1]) - im = im.resize((dots_printable[0], hsize), Image.ANTIALIAS) + im = im.resize((dots_printable[0], hsize), Image.LANCZOS) logger.warning('Need to resize the image...') if im.size[0] < device_pixel_width: new_im = Image.new(im.mode, (device_pixel_width, im.size[1]), (255,)*len(im.mode)) From cdd3bfce5839c0a0401c8deec327c14f555d39b7 Mon Sep 17 00:00:00 2001 From: Lennart Haas Date: Wed, 30 Aug 2023 14:40:44 +0200 Subject: [PATCH 2/2] feat: bumped pillow version to min 10.0.0 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 09be49e..03c2487 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ "click", "future", "packbits", - "pillow>=3.3.0", + "pillow>=10.0.0", "pyusb", 'attrs', 'typing;python_version<"3.5"',