While using the grab function from PIL.ImageGrab, there's a parameter called bbox, which specifies the bounding box of which the screengrab should be taken. And when I want to get the value of a specific pixel, what should the coordinates be?
For example:
im = ImageGrab.grab(bbox=(500, 500, 600, 700)
print(im.getpixel(510, 510))
print(im.getpixel(10, 10))
Both the statements give me an error. What am I doing wrong here?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…