module for assessing gray levels of gray level bitmap?

Oliver Pust oliver.pust at web.de
Tue Mar 26 09:14:10 EST 2002


Fredrik Lundh wrote:
> Oliver Pust wrote:
> 
> 
>>is there a module for assessing the gray levels of gray level bitmap? I
>>am thinking of a module that allows to open a bmp-file and stores the
>>gray levels of each pixel in form of a matrix e.g. gray_level[x,y].
>>
> 
> http://www.pythonware.com/products/pil/index.htm
> 
> from PIL import Image
> 
> im = Image.open("myimage.bmp")
> print im.getpixel((x, y))
Thank you, that is what I looked for.

Oliver




More information about the Python-list mailing list