Skip to main content

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')

    break #if you break out of the loop, stop capturing 

capt.kill_screencap()

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

window_capture_streaming-0.14.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

window_capture_streaming-0.14-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file window_capture_streaming-0.14.tar.gz.

File metadata

  • Download URL: window_capture_streaming-0.14.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for window_capture_streaming-0.14.tar.gz
Algorithm Hash digest
SHA256 ce34615b46c1de8ea832dd1e4e88247dc23a894d4580450306ea9be7979dec21
MD5 ecd697e6aac62edde316a472b0fe083b
BLAKE2b-256 0b3bb1a3dd6c7e35d0e8d19ca15932788cce7f540a4bbaae1af0bdc1e7c29ffb

See more details on using hashes here.

File details

Details for the file window_capture_streaming-0.14-py3-none-any.whl.

File metadata

File hashes

Hashes for window_capture_streaming-0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 3cab671ecb065c90ad119e0f9a8cbe8f6b39e394852e61b54b7f0e44912cdb5b
MD5 5cc0e946f6396cac3f2700c15c95a922
BLAKE2b-256 5724f1a44c1de0b73f7f3bb505758397033303256a58a3e007dcfaa75477b15a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.14 This release

2 files

0.13

2 files

0.12

2 files

0.11

2 files

0.10

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page