File size: 262 Bytes
510ee71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from PIL import Image


def resize_pil_image(
    pil_image: Image,
    image_width,
    image_height,
):
    return pil_image.convert("RGB").resize(
        (
            image_width,
            image_height,
        ),
        Image.Resampling.LANCZOS,
    )