I am using PIL to grab a screen shot, but it is only capturing a part of the screen.
Here is a screen shot of my desktop
And this is what the program captures
As you can see, the screen has a good amount of space chopped off on the side and along the bottom. I tried to correct this by adjusting the size of the capture zone, but that just resulted in the extra areas just to be filled with black
I'm thinking that there is a limit to the maximum resolution that the library can capture, but I cant really find any documentation saying so.
Below is my code
import ImageGrab
import os
import time
def screenGrab():
box = (0, 0, 1920, 1080)
im = ImageGrab.grab(box)
im.save(os.getcwd() + '\screenshot_' + str(int(time.time())) + '.png', 'PNG')
def main():
screenGrab()
if __name__ == '__main__':
main()
Dose anyone know how to fix this issue or know why its happening?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…