[Image-SIG] PIL 1.0b1
Piers Lauder
piers@cs.su.oz.au
Mon, 19 Apr 1999 17:43:56 +1000
On Mon, 19 Apr 1999 07:14:09 +0000, Steve Purcell wrote:
>
> Piers Lauder wrote:
> >
> > There is an error in the definition of "new" in Image.py
> > the distributed version has
> > def new(mode, size, color = 0):
> > "Create a new image"
> >
> > if color is None:
> >
> > it should be:
> > def new(mode, size, color = None):
>
> No it shouldn't. '0' is the RGB for black, which the documentation
> states is the default fill.colour for new images. 'None' means don't
> initialise the image, which sounds like asking for trouble. :-)
I stand corrected :-)
Here's the error I though I was fixing:
: s ; facemail -w
Traceback (innermost last):
File "/local/usr/bin/facemail", line 4, in ?
try: exec "import %s; %s.main(%s.args())" % (mod, mod, mod)
File "<string>", line 1, in ?
File "/local/usr/lib/facemail/facemail.py", line 678, in main
getface.InitFaceImage(root)
File "/local/usr/lib/facemail/getface.py", line 65, in InitFaceImage
WhiteFaceImage = ImageTk.BitmapImage(Image.new('1', (width, height)))
File "/usr/local/lib/python1.5/site-packages/PIL/Image.py", line 855, in new
return Image()._makeself(core.fill(mode, size, color))
SystemError: new style getargs format but argument is not a tuple
Anything obvious to look for?
(this program works fine with the PIL 0.3b1 release.)