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')