OSError: image file is truncated (12 bytes not processed) Premature end of JPEG file

简介: OSError: image file is truncated (12 bytes not processed) Premature end of JPEG file

解决办法是,再添加如下2句代码:


from PIL import ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True


目录
相关文章
成功解决OSError: Unable to open file (truncated file: eof = 8388608, sblock->base_addr = 0, stored_eof =
成功解决OSError: Unable to open file (truncated file: eof = 8388608, sblock->base_addr = 0, stored_eof =
成功解决OSError: Unable to open file (truncated file: eof = 8388608, sblock->base_addr = 0, stored_eof =
|
7月前
|
XML 移动开发 Unix
open(file, mode=‘r‘, buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=No
open(file, mode=‘r‘, buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=No
|
算法 开发者
关于 加载图片"Corrupt JPEG data: premature end of data segment" 的解决方法
关于 加载图片"Corrupt JPEG data: premature end of data segment" 的解决方法
关于 加载图片"Corrupt JPEG data: premature end of data segment" 的解决方法
Can‘t read file : End of file found 文件:txn_current、current svn无法正常读取文件
Can‘t read file : End of file found 文件:txn_current、current svn无法正常读取文件
Can‘t read file : End of file found 文件:txn_current、current svn无法正常读取文件
成功解FileNotFoundError: [Errno 2] No such file or directory: './data\\mnist\\train-images-idx3-ubyte'
成功解FileNotFoundError: [Errno 2] No such file or directory: './data\\mnist\\train-images-idx3-ubyte'
成功解FileNotFoundError: [Errno 2] No such file or directory: './data\\mnist\\train-images-idx3-ubyte'
OSError: cannot write mode P as JPEG
OSError: cannot write mode P as JPEG
611 0
成功解决fp = builtins.open(filename, "rb") OSError: [Errno 22] Invalid argument: 'F:\\File_Pyt
成功解决fp = builtins.open(filename, "rb") OSError: [Errno 22] Invalid argument: 'F:\\File_Pyt
|
缓存 Oracle 关系型数据库
[20171128]rman Input or output Memory Buffers.txt
[20171128]rman Input or output Memory Buffers.txt --//Input Memory Buffers如何测试,不清楚.不过找到一本电子书.
1087 0
|
缓存 Oracle 关系型数据库
[20171128]rman input memory buffer 3.txt
[20171128]rman input memory buffer 3.txt --//Input Memory Buffers如何测试,不清楚.不过找到一本电子书.
1122 0
|
缓存 Oracle 关系型数据库
[20171129]rman input memory buffer 4.txt
[20171129]rman input memory buffer 4.txt --//Input Memory Buffers如何测试,不清楚.不过找到一本电子书.
929 0

热门文章

最新文章