[Image-SIG] Image.load() issues.
Colin Barnette
colin.barnette at gmail.com
Fri Jan 5 09:44:49 CET 2007
I'm having some really odd trouble with PIL. As shown on in the Handbook I have:
import Image
print Image.VERSION
img = Image.load("sushi.jpg")
And the output I get is this:
1.1.6
Traceback (most recent call last):
File "pichtml.py", line 5, in ?
img = Image.load("sushi.jpg")
AttributeError: 'module' object has no attribute 'load'
So I tried:
img = Image.Image.load("sushi.jpg")
Traceback (most recent call last):
File "pichtml.py", line 3, in ?
img = Image.Image.load("sushi.jpg")
TypeError: unbound method load() must be called with Image instance
as first argument (got str instance instead)
And finally:
img = Image.Image()
img.load("sushi.jpg")
Traceback (most recent call last):
File "D:\pichtml.py", line 4, in ?
img.load("sushi.jpg")
TypeError: load() takes exactly 1 argument (2 given)
What am I doing wrong?
Any help or ideas would be appreciated.
More information about the Image-SIG
mailing list