项目场景:
labeme打开图像报OSError: image file is truncated (4 bytes not processed)错误:
例如:使用labelme标注文件时打开图片闪退,之后shell界面报OSError: image file is truncated (4 bytes not processed)
问题描述:
1.我们发现这个问题是图片格式出问题了,用opencv打开图片查看图片格式,有问题的图片格式是object,没有问题的图片格式是uint8:
2.直接对有问题的图片转格式,代码为:
im_rr = Image.fromarray(np.uint8(img)) #img为有问题的图片
报错:int() argument must be a s