cbz2ebook: Refer constants by their new names
The old ones are deprecated and will be removed in Pillow 10.
This commit is contained in:
parent
2b5735a380
commit
9d479c44ca
|
@ -33,7 +33,7 @@ def scaled_size(in_width, in_height, out_width, out_height):
|
||||||
def process_image(im):
|
def process_image(im):
|
||||||
# double pages (wider than high) should be rotated
|
# double pages (wider than high) should be rotated
|
||||||
if im.width > im.height:
|
if im.width > im.height:
|
||||||
im = im.transpose(Image.ROTATE_90)
|
im = im.transpose(Image.Transpose.ROTATE_90)
|
||||||
|
|
||||||
# convert to greyscale
|
# convert to greyscale
|
||||||
im = im.convert("L")
|
im = im.convert("L")
|
||||||
|
@ -42,7 +42,7 @@ def process_image(im):
|
||||||
if should_scale(im.width, im.height, args.width, args.height):
|
if should_scale(im.width, im.height, args.width, args.height):
|
||||||
im = im.resize(
|
im = im.resize(
|
||||||
scaled_size(im.width, im.height, args.width, args.height),
|
scaled_size(im.width, im.height, args.width, args.height),
|
||||||
resample=Image.LANCZOS,
|
resample=Image.Resampling.LANCZOS,
|
||||||
)
|
)
|
||||||
|
|
||||||
return im
|
return im
|
||||||
|
|
Loading…
Reference in a new issue