From 9d479c44cab7e8a30b73e6eb59cd0c3b6707cf7e Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Fri, 15 Jul 2022 23:36:48 +0200 Subject: [PATCH] cbz2ebook: Refer constants by their new names The old ones are deprecated and will be removed in Pillow 10. --- cbz2ebook.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cbz2ebook.py b/cbz2ebook.py index efc1bc2..8e95462 100755 --- a/cbz2ebook.py +++ b/cbz2ebook.py @@ -33,7 +33,7 @@ def scaled_size(in_width, in_height, out_width, out_height): def process_image(im): # double pages (wider than high) should be rotated if im.width > im.height: - im = im.transpose(Image.ROTATE_90) + im = im.transpose(Image.Transpose.ROTATE_90) # convert to greyscale im = im.convert("L") @@ -42,7 +42,7 @@ def process_image(im): if should_scale(im.width, im.height, args.width, args.height): im = im.resize( scaled_size(im.width, im.height, args.width, args.height), - resample=Image.LANCZOS, + resample=Image.Resampling.LANCZOS, ) return im