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

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

代码示例6
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)