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 =
|
5月前
|
Android开发
error: GLES2/gl2.h: No such file or directory
error: GLES2/gl2.h: No such file or directory
|
算法 开发者
关于 加载图片"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
563 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
### how to write file faster
结论: 同样写1G 大小的文件, 4k memory and file address aligned 写入: buffer write: 16920538 us fallocate + buffer write: 13469360 us fallocate + filling zero + buffer write: 4028809 us 可以看出fall
1194 0
|
Oracle 关系型数据库 Linux
[20180109]disk file operations.txt
[20180110]disk file operations.txt --//调查生产系统相关disk file operations问题,记录一下: 1.环境: XXXX> @ &r/ver1 PORT_STRING                  ...
1102 0
|
缓存 Oracle 关系型数据库
[20171128]rman Input or output Memory Buffers.txt
[20171128]rman Input or output Memory Buffers.txt --//Input Memory Buffers如何测试,不清楚.不过找到一本电子书.
1076 0