0

I want to get the color of pixels on the screen in Python3.x. (example x,y) I work on windows. and using tkinter. But, It can't use PIL in Python 3.x.

How can i do this. Thank you.

user1161599
  • 261
  • 1
  • 4
  • 17

1 Answers1

0

You can use PIL on Python3.x; there is a binary installer for Windows. The code might not work as is both on Python2.x and Python3.x:

try: import Image         # Python 2.x
except ImportError:
    from PIL import Image # Python 3.x

You could capture an area of the screen using an analog of grab() method.

jfs
  • 399,953
  • 195
  • 994
  • 1,670