I executed the following code to take a screenshot with Pillow.However, both the x-axis and y-axis of the computer screen are captured in half.1000px by 1000px will capture only 500px by the top left of the screen as the starting position.I would appreciate it if you could let me know the improvements.
(The result was the same when you specified pixels.It's expected to recognize the entire screen up to half the width.)
from PIL import ImageGrab
defmain():
extraction=ImageGrab.grab()
extraction.show()
if__name__=="__main__":
main()
There was a Windows user who encountered the same problem at home SO and solved it.
https://stackoverflow.com/questions/24370228/python-imaging-library-fails-to-grab-whole-screen
According to him
The above steps will make it work properly.
Give it a try.
© 2024 OneMinuteCode. All rights reserved.