cbz2ebook: Refer constants by their new names

The old ones are deprecated and will be removed in Pillow 10.
This commit is contained in:
Simon Bruder 2022-07-15 23:36:48 +02:00
parent 2b5735a380
commit 9d479c44ca
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

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