This commit is contained in:
JerryXiao 2023-03-10 16:52:44 +08:00
parent d85051f928
commit 1761d44cb9
1 changed files with 2 additions and 1 deletions

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