Python图片缩放 解释 例子 解释 Python 里对图片进行缩放可以使用 PIL.Image.resize 方法。 例子 对最大尺寸大于 1024 的图片进行缩放 from PIL import Image import shutil def main(): input_path = 'xxx' output_path = 'xxx' fix_size = 1024 img = Image.open(