OSError: image file is truncated (28 bytes not processed)

图像文件放在linux服务器上,加载的时候报错,解决办法:

在代码中添加两行

from PIL import ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True
posted @ 2019-08-16 10:31  嶙羽  阅读(1414)  评论(0编辑  收藏  举报