[Image-SIG] Usage of getpixel

Fredrik Lundh fredrik at pythonware.com
Sun Oct 2 17:37:36 CEST 2005


"alainlioret" <alainlioret at wanadoo.fr> wrote:

> I try to use getpixel(xy) ...
>
> But I can't ..
>
> for example, I try :
>
> pix = im.getpixel(0,0)
>
> But I have an error. What's wrong ?
>
> Can you give me an example ?

getpixel expects a coordinate tuple, not two separate arguments.  to
get the pixel in the upper left corner, use:

    pix = im.getpixel((0, 0))

</F>





More information about the Image-SIG mailing list