from PIL import ImageORIGN_PATH = 'D:/program/tool/1.png'TARGET_PATH = 'D:/program/tool/1.png'im = Image.open(ORIGN_PATH)im = im.transpose(Image.FLIP_LEFT_RIGHT) # 左右翻转im = im.transpose(Image.FLIP_TOP_BOTTOM) # 上下翻转im.save(TARGET_PATH)
700字范文,内容丰富有趣,生活中的好帮手!