ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> image-sig
image-sig
[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


Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved