PIL Open Problem

Corey Richardson kb1pkl at aim.com
Mon Feb 7 17:28:45 EST 2011


On 02/07/2011 05:27 PM, Richard Holmes wrote:
> I'm trying to create an image for use in Tkinter. If I understand the
> PIL documentation correctly, I first need to import Image, then
> create an instance of the Image class and call 'open'

Don't do that. This is wrong:

import Image
im = Image.Image()
im = im.open(foo)

This is good:

import Image
im = Image.open(foo)



More information about the Python-list mailing list