LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1216|回复: 0

奇怪的问题,怎么解决,请看看。

[复制链接]
发表于 2010-12-1 18:15:16 | 显示全部楼层 |阅读模式
import Image

im = Image.open('a.png')

r,g,b = im.split()

r.show()

------------------------------------------
Traceback (most recent call last):
  File "a.py", line 5, in <module>
    r,g,b = im.split()
  File "/usr/lib/python2.6/site-packages/PIL/Image.py", line 1497, in split
    if self.im.bands == 1:
AttributeError: 'NoneType' object has no attribute 'bands'
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表