On Thu, Mar 10, 2005 at 06:46:39PM -0500, Ray Pasco wrote:
> Jeff -
> 
> Thanks for the tips.  The documentation specifically says that
> im.point() can only be used to convert  mode L and P images to mode 1
> images, and that the mode string must be specified as the second
> parameter.  If not so, the present handbook is very wrong and
> misleading.

I read the documentation here:
    http://www.pythonware.com/library/pil/handbook/image.htm

The part I read was this:
   im.point(table)    => image
   im.point(function) => image

    Returns a copy of the image where each pixel has been mapped through the
    given table. The table should contains 256 values per band in the image. If
    a function is used instead, it should take a single argument. The function
    is called once for each possible pixel value, and the resulting table is
    applied to all bands of the image.

    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

    Map floating point images

        out = im.point(lambda i: i * 1.2 + 10)

    You can leave out either the scale or the offset. 
Just below that is the documentation for the form of im.point you're
mentioning.

Jeff

Attachment: pgpk1oKS691fU.pgp
Description: PGP signature

_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to