This commit is contained in:
JerryXiao 2023-03-10 16:52:44 +08:00
parent d85051f928
commit 1761d44cb9

View file

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