Grab screenshots from a specific window and process them right away (for bots or video streaming)
Project description
Grab screenshots from a specific window and process them right away
pip install window-capture-streaming
from window_capture_streaming import WindowIterCapture
import re
import cv2
capt = WindowIterCapture(
hwnd=None,
window_text=re.compile(r".*bluestacks.*", flags=re.IGNORECASE),
show_capture_keys="ctrl+alt+z", # starts cv2.imshow() - can be enabled/disabled by pressing ctrl+alt+z
show_fps_keys="ctrl+alt+f", # show the fps rate - can be enabled/disabled by pressing ctrl+alt+f
kill_screencap_keys="ctrl+alt+x", # kills the capture process
)
for screen_shot in capt.get_screenshot(
sleeptime=None,
resize_width=None,
resize_height=None,
resize_percent=None,
interpolation=cv2.INTER_AREA,
):
pass
# print('do some stuff here')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for window_capture_streaming-0.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c79f8cca0c95f47be72a15179dc378768dd6f81cf50a4f4ad2aba03324b24d76 |
|
MD5 | 0b760aa28c5610cc7d4a89e67e0c0ac3 |
|
BLAKE2b-256 | a8cb6f80f818bc54a682f1c47755e8da7a8d946196c7c761cfd4305391cc522c |
Close
Hashes for window_capture_streaming-0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e00f27250b09ac5d867f3f73e0f62cf45482e3e46d437f4f8657f0d3876b727 |
|
MD5 | 4238c63eb1ce5f6a978572d7945ee43f |
|
BLAKE2b-256 | 54169c20f3d3c02a89eddecad684baa1f3ffe5929ec75d1cde5815cde8d38e7d |