Re: [Image-SIG] Re: Image.eval problem with math.sqrt
by other posts by this author
Jul 14 2003 11:46AM messages near this date
[Image-SIG] Re: Image.eval problem with math.sqrt
|
[Image-SIG] Image.eval problem with math.sqrt
On 13 Jul 2003 20:10:17 -0400
"Alan Grosskurth" <alan.grosskurth@[...].ca> wrote:
> 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)
This gets beyond my knowledge. That code calls point(), and according to
the docs:
If the image has mode "I" (integer) or "F" (floating point), you
must use a function, and it must have the following format: argument
* scale+ offset
Example: Map floating point images
out = im.point(lambda i: i * 1.2 + 10)
You can leave out either the scale or the offset.
Using the example lambda works in your eval(), but I don't see how to
get in a sqrt(). Perhaps someone with better Python knowledge can help?
-Bill
--
Sattre Press The King in Yellow
http://sattre-press.com/ by Robert W. Chambers
info@[...].com http://kiy.sattre-press.com/
_______________________________________________
Image-SIG maillist - Image-SIG@[...].org
http://mail.python.org/mailman/listinfo/image-sig
Thread:
Alan Grosskurth
|