[Image-SIG] RGB conversion to CMKY gives strange results

Jeff Epler jepler at unpythonic.net
Fri Mar 11 04:45:03 CET 2005


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.python.org/pipermail/image-sig/attachments/20050310/f1d76ff5/attachment.pgp


More information about the Image-SIG mailing list