Sample a pixel from tk canvas

Is there any method to get a pixel from the canvas? I can draw a pixel
(painfully by using either
line or rectangle, same storage anyway) but can I sample a pixel ?

I recall vaguely that Java could probably do it, how about Qt4?
(haven’t done anything in Qt4
and haven’t coded Java for years.)

Thank you.

Tee Shift.

sorry, did not do the homework. someone has asked it and the answer
could be found