I have been trying to check if a pixel on the screen is changing. What do I need to do?
I have surfed the internet for a long time with no success. I have experiment
This works for me:
#!/usr/bin/env python3
from PIL import ImageGrab
while True:
px=ImageGrab.grab().load()
m=px[613,296]
print(m)
I think it will be faster if you just grab one pixel though by specifying a bounding box like this so you only grab one pixel:
#!/usr/bin/env python3
from PIL import ImageGrab
while True:
screen=ImageGrab.grab(bbox=(613,296,614,297))
px = screen.load()
m=px[0,0]
print(m,screen.size)