from PIL import Image src = r"C:\Users\86176\.dsh\attachments\v1\objects\20\20844c3f5c9a090e1010da3d62ae091792c3e25fad6bdd38cc991b054f020d95" out = r"D:\daima\smartor\smartor-web\tmp-img\crop1.png" img = Image.open(src) print("size", img.size) # 箭头头部附近区域 box = (1050, 130, 1450, 420) crop = img.crop(box) crop = crop.resize((crop.width * 3, crop.height * 3), Image.LANCZOS) crop.save(out) print("saved", out, crop.size)