[IMAGE-SIG] Float image ?

Fredrik Lundh fredrik.lundh@image.combitech.se
Wed, 10 Sep 1997 19:49:57 +0200

>Is there a way to display a float Image ? 

If we're talking Tkinter (ImageTk), just do as usual. PIL
will automatically convert the floating point image to a
greyscale image (mode "L"). Values outside the range
0-255 are clipped.

You can rescale the floating point image via point method,
using the following syntax:

    imOut = imIn.point(lambda v: v*scale+offset)

If imIn is a floating point image, the argument *must* be a
lambda expression, having the format described above.

convert("L") also works on floating point images.

Cheers /F

IMAGE-SIG - SIG on Image Processing with Python

send messages to: image-sig@python.org
administrivia to: image-sig-request@python.org