[Image-SIG] Re: Help wanted: sensible way to scale 16-bitgrayscaleimage

Fredrik Lundh fredrik at pythonware.com
Sat Dec 18 17:01:16 CET 2004


I wrote:

> adding 16-bit LUT support shouldn't be too hard; I'll look into this for the
> next beta.  (but you'll have to provide 65536 values, not 256 values)

the next release will provide limited support for I->L mappings; the following
case now works:

    assert im.mode == "I"
    assert len(lut) == 65536
    out = im.point(lut, "L")
    assert out.mode == "L"

(that is, only 16-bit mappings are currently supported; values outside the
0..65535 range are clipped before being mapped through the table)

</F> 





More information about the Image-SIG mailing list