[Image-SIG] Question about ImageDraw.Draw function

Mark Shure SHUREM at ccf.org
Tue Aug 26 16:04:57 EDT 2003


I'm a relative newcomer to Python and PIL, but I've been using it successfully for several months. I was stumped by the error I got when I tried using the ImageDraw.Draw(im) function. Here is what I see when I run example code straight out of the PIL 1.1.3 Overview document:

>>> import Image, ImageDraw
>>> im = Image.open("lena.ppm")
>>> draw = ImageDraw.Draw(im)
Traceback (most recent call last):
  File "C:/Python22/imageDraw_test2.py", line 3, in ?
    draw = ImageDraw.Draw(im)
  File "C:\Python22\lib\site-packages\PIL\ImageDraw.py", line 72, in __init__
    self.draw = Image.core.draw(self.im, blend)
AttributeError: 'module' object has no attribute 'draw'

I'm using Python 2.2.1 under Win2k with PIL 1.1.4 (binaries installed using "PIL-1.1.4.win32-py2.2.exe").

I haven't been able to find any leads on the web or in the Image-SIG mailing list archive. Any suggestions would be appreciated.


Mark Shure
<shurem at ccf.org>

Confidentiality Note:  This message is intended for use only by the individual or entity to which it is addressed and may contain information that is privileged, confidential, and exempt from disclosure under applicable law.  If the reader of this message is not the intended recipient or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.  If you have received this communication in error,  please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy.  Thank you.

More information about the Image-SIG mailing list