python - 我如何在 Python 中开发屏幕捕获工具

标签 python screen-capture

我现在正在学习 Python,想用 Python 开发一个屏幕捕获工具,我该如何完成这项工作?

最佳答案

如果您使用的是 Windows,请使用 ImageGrab module连同 Imaging library .
类似于:

from PIL import ImageGrab
ImageGrab.grab().save("screenshot.jpg", "JPEG")

关于python - 我如何在 Python 中开发屏幕捕获工具,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3377038/

相关文章:

python - ImproperlyConfigured : You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings. configure() 在访问设置之前

python - 如何将 JSON 字符串转换为 Python 数据结构

java - 捕获屏幕截图并将其转换为 base64 字符串

linux - Linux 上的屏幕截图

android - 如何在 Motorola Xoom 上进行屏幕截图?

linux - OpenGL窗口视频采集问题

python - python中的函数注解

python - 牛顿法 : order of statements in loop

c# - 获取窗口的区域

python - 次要情节标题与情节主标题位于同一位置