解决办法是,再添加如下2句代码:
from PIL import ImageFile ImageFile.LOAD_TRUNCATED_IMAGES = True
参考网址:https://www.cnblogs.com/hongfei/p/4436767.html
Python:IOError: image file is truncated 的解决办法
原文:https://www.cnblogs.com/lxz123/p/14252179.html