Python Imaging Library fails to grab whole screen

前端 未结 2 622
甜味超标
甜味超标 2020-12-10 07:37

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 captur

2条回答
  •  心在旅途
    2020-12-10 08:30

    There is a working workaround for this without fiddling with the OS settings. The solution is to use the following to make your program DPI aware on Windows :

    from ctypes import windll
    user32 = windll.user32
    user32.SetProcessDPIAware()
    

    Hope that helps

提交回复
热议问题