[Image-SIG] PIL 1.0b1

Piers Lauder piers@cs.su.oz.au
Mon, 19 Apr 1999 10:03:05 +1000

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):

After that fix, I get an error I can't explain:
	(I uncommented the print statement in _getdecoder())

	<built-in function xbm_decoder> ('1',)
	<built-in function raw_decoder> ('1', '1')
	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 680, in main
	  File "/local/usr/lib/facemail/facemail.py", line 738, in UpdateScan
	  File "/local/usr/lib/facemail/facemail.py", line 219, in UpdateFaces
	    newmail = _UpdateFaces(newmail)
	  File "/local/usr/lib/facemail/facemail.py", line 338, in _UpdateFaces
	    c = FaceFrames[row][col].configure(msg)
	  File "/local/usr/lib/facemail/Face.py", line 132, in configure
	  File "/local/usr/lib/facemail/Face.py", line 246, in _details
	    self.face = getface.GetFaceImage(addr,
	  File "/local/usr/lib/facemail/getface.py", line 186, in GetFaceImage
	    tkim = _makeface(addr, face, file)
	  File "/local/usr/lib/facemail/getface.py", line 231, in _makeface
	    im = Image.fromstring('1', (width, height), bitmap, 'raw', '1')
	  File "/usr/local/lib/python1.5/site-packages/PIL/Image.py", line 869, in fromstring
	    im.fromstring(data, decoder_name, args)
	  File "/usr/local/lib/python1.5/site-packages/PIL/Image.py", line 364, in fromstring
	    d = _getdecoder(self.mode, decoder_name, args)
	  File "/usr/local/lib/python1.5/site-packages/PIL/Image.py", line 225, in _getdecoder
	    return apply(decoder, (mode,) + args + extra)
	TypeError: illegal argument type for built-in operation

(I stupidly trashed the previous version of PIL, so now I'm in a bit of a bind :-)

Anyone have a fix?