纯python中使用cTypes的超快速跨平台多屏幕截图模块。
mss的Python项目详细描述
frommssimportmss# The simplest use, save a screen shot of the 1st monitorwithmss()assct:sct.shot()
纯python中使用cTypes的超快速跨平台多屏幕截图模块。
- python 2&3和pep8兼容,没有依赖关系;
- 非常基本,它将抓取一个屏幕截图或所有监视器的屏幕截图,并将其保存到PNG文件中;
- 但您可以使用pil并从其所有格式中获益(或直接添加您的格式);
- 与numpy和opencv很好地集成;
- 它可以很容易地嵌入游戏和其他软件中,这些软件需要快速和平台优化的方法来抓取屏幕快照(如人工智能、计算机视觉);
- 获取source code on GitHub;
- 使用bunch of examples; 学习
- 你可以report a bug;
- 需要帮助吗?在StackOverflow; 上使用标记python mss
- 还有一个complete, and beautiful, documentation:)
- mss表示多个屏幕快照;
安装
您可以使用pip安装它:
python -m pip install --upgrade mss