Discuss / Python / 求问python打开图片出问题‘ IOError: cannot identify image file ’怎么办?

求问python打开图片出问题‘ IOError: cannot identify image file ’怎么办?

windows系统,代码如下:

import Image im = Image.open('D:/pythonword/tt.jpg') print im.format, im.size, im.mode

系统报错: IOError: cannot identify image file 文件路径下确实存在图片tt.jpg,为什么还是不能识别图片文件呢? 求讲解,谢谢。


  • 1

Reply