OSError: image file is truncated (28 bytes not processed) 图像文件放在linux服务器上,加载的时候报错,解决办法: 在代码中添加两行 from PIL import ImageFile ImageFile.LOAD_TRUNCATED_IMAGES = True