1. 程式人生 > >Python PIL Image "image file is truncated"問題解決

Python PIL Image "image file is truncated"問題解決

錯誤提示:

IOError: image file is truncated (5 bytes not processed)
1
解決方法:

from PIL import ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True