📜  pil 调整图像大小 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:09.382000             🧑  作者: Mango

代码示例4
from PIL import Image

from resizeimage import resizeimage


with open('test-image.jpeg', 'r+b') as f:
    with Image.open(f) as image:
        cover = resizeimage.resize_cover(image, [200, 100])
        cover.save('test-image-cover.jpeg', image.format)