[Image-SIG] Re: PIL image processing

Fredrik Lundh fredrik at pythonware.com
Fri Nov 5 10:25:53 CET 2004


Ajay Abhyankar wrote:

> I have used lookup table for controlling the threshold of an image using the point(table) method. 
> To set the threshold of an image, I create a list of 256 values. All values till threshold (in 
> range 0-255) are turned to 0 and the rest above threshold value are turned to 255. This list is 
> supplied to the point method as lookup table. When applied to the image it works fine.
>
> Similarly, if I want to manipulate Brightness/Contrast of an image using lookup table for an 
> image, how can I get the lookup table for an image with existing values (so as to manipulate them) 
> instead of creating a new lookup table.

images don't have lookup tables; the point method maps the pixel values
through the table you provided, and returns a new image.

to create a linear lookup table, use "lut = range(256)"

</F>






More information about the Image-SIG mailing list