Getting pixel values under cursor
aoeu at go.com
Mon Jun 17 12:56:16 CEST 2002
"Bill" <metaliu at yahoo.com> wrote in message news:<adrhgi$mh$1 at nntp1.jpl.nasa.gov>...
> I'm using Tkinter right now for a GUI. Is there a way for me to get, in
> real time or when the user clicks the mouse button on a pixel, the pixel
> intensity value? Currently, I have a tkinter label which is showing a large
> grey scale image. I would like the user to move the mouse cursor over the
> image and show the pixel intensity under the cursor. Is there a way to do
> this? Perhaps some kind of event binding with the mouse and the image?
> Would putting the image in a canvas instead provide more flexibility?
> Thanks in advance,
Changing the cursor repeatedly will take some considerable background
processing. Just bind mouse moves to check to see if it's within the
label--if it is, display in a status box, if not, display nothing
More information about the Python-list