Unable to open images with Python's Image.open()
- by ensnare
My code reads:
import Image
def generateThumbnail(self, width, height):
"""
Generates thumbnails for an image
"""
im = Image.open(self._file)
When I call this function, I get an error:
? AttributeError: type object 'Image' has no attribute 'open'
However in the console:
import Image
im = Image.open('test.jpg')
I have no problem.
Any ideas?
Thanks!