读取图像出现”image file is truncated“错误: 添加如下两行代码解决: from PIL import ImageFile ImageFile.LOAD_TRUNCATED_IMAGES = True