[Image-SIG] Re: Image.eval problem with math.sqrt
by Alan Grosskurth other posts by this author
Jul 14 2003 12:10AM messages near this date
Re: [Image-SIG] Re: Image.eval problem with math.sqrt
|
Re: [Image-SIG] Re: Image.eval problem with math.sqrt
> It looks like the arguments in the documentation are reversed. Should
> be:
>
> out = Image.eval(im, math.sqrt)
Thanks for the help, Bill. That works fine for 8-bit images, but I'm
still have trouble with mode 'I' images (32-bit integer):
image = Image.new('I', (10, 10))
out = Image.eval(image, math.sqrt)
And I get this error:
Traceback (most recent call last):
File "<stdin> ", line 1, in ?
File "/h/45/grosskur/lib/python2.2/site-packages/PIL/Image.py", line
1634, in eval
return image.point(args[0])
File "/h/45/grosskur/lib/python2.2/site-packages/PIL/Image.py", line
924, in point
scale, offset = _getscaleoffset(lut)
File "/h/45/grosskur/lib/python2.2/site-packages/PIL/Image.py", line
339, in _getscaleoffset
data = expr(_E(stub)).data
AttributeError: _E instance has no attribute '__float__'
Any help is appreciated.
Thanks,
Alan
_______________________________________________
Image-SIG maillist - Image-SIG@[...].org
http://mail.python.org/mailman/listinfo/image-sig
Thread:
Alan Grosskurth
|