The trivial
import Image
im = Image.OPEN('C:\abc.bmp')
results in the following exception
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
im = Image.OPEN('C:\Documents and Settings\umair.ahmed\My Documents\My Pictures\avanza.bmp')
TypeError: 'dict' object is not callable
开发者_JS百科
not sure if i am missing something, kindly help.
Use:
Image.open()
It's case-sensitive.
I don't think the error message came from your input, because the file names are different, but you should not use 'C:\abc.bmp'
, in your open()
call, but use either C:/abc.bmp
, or r'C:\abc.bmp'
. Backslash is an escape character in Python.
精彩评论