PIL Example

Fredrik Lundh fredrik at effbot.org
Tue Jan 23 14:52:52 EST 2001


"smibr at my-deja.com" wrote:
> When I run the following example from the PIL documentation, the
> traceback indicates an attempt to redefine "fill" in line xx. Has the
> mechanism for passing named parameters changed in 2.0?
>
> Thanks.
>
> import Image, ImageDraw
>
> im = Image.open("lena.pgm")
>
> draw = ImageDraw.Draw(im)
> draw.line((0, 0) + im.size, fill=128)
> draw.line((0, im.size[1], im.size[0], 0), fill=128)
> del draw
>
> # write to stdout
> im.save(sys.stdout, "PNG")

It works just fine on my box...

What PIL version are you using (Image.VERSION)

Cheers /F





More information about the Python-list mailing list