From 1761d44cb95bc7ca22302643cfbbd7645dc711c9 Mon Sep 17 00:00:00 2001 From: Jerry Date: Fri, 10 Mar 2023 16:52:44 +0800 Subject: [PATCH] u --- draw-gen3.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/draw-gen3.py b/draw-gen3.py index d71f255..a22b269 100644 --- a/draw-gen3.py +++ b/draw-gen3.py @@ -154,6 +154,7 @@ def draw(img): end = time.time() print(f"{1000*(end-start):.1f}ms {1000*(end-startsend):.1f}ms") +LANCZOS = Image.Resampling.LANCZOS if getattr(Image, 'Resampling', None) else Image.LANCZOS ldraw = img.copy() -draw(Image.open(args.image).convert('RGBA').resize((X, Y), Image.Resampling.LANCZOS)) +draw(Image.open(args.image).convert('RGBA').resize((X, Y), LANCZOS)) print('success')