Skip to main content

No project description provided

Project description

Windows Capture

Utilize the Windows Graphics Capture API to capture the client area of a window.

Requires Windows 10 and Python 3.8 or later.

Usage

import cv2
import numpy as np
from windows_cap import WindowCapture

# Create a WindowCapture object with the window title and class name (optional)
wincap = WindowCapture("Untitled - Notepad", "CLASSNAME")

while True:
    data = wincap.next()
    w, h = wincap.client_size
    img = np.frombuffer(data, dtype=np.uint8)
    img = np.reshape(img, (h, w, 4))
    img = cv2.resize(img, (w // 4, h // 4))
    cv2.imshow("WGC", img)
    if cv2.waitKey(1) == ord('q'):
        cv2.destroyAllWindows()
        break

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

windows_cap-0.1.2.tar.gz (12.0 kB view details)

Uploaded Source

Built Distributions

windows_cap-0.1.2-cp312-none-win_amd64.whl (157.5 kB view details)

Uploaded CPython 3.12Windows x86-64

windows_cap-0.1.2-cp312-none-win32.whl (152.6 kB view details)

Uploaded CPython 3.12Windows x86

windows_cap-0.1.2-cp311-none-win_amd64.whl (157.0 kB view details)

Uploaded CPython 3.11Windows x86-64

windows_cap-0.1.2-cp311-none-win32.whl (152.5 kB view details)

Uploaded CPython 3.11Windows x86

windows_cap-0.1.2-cp310-none-win_amd64.whl (157.0 kB view details)

Uploaded CPython 3.10Windows x86-64

windows_cap-0.1.2-cp310-none-win32.whl (152.5 kB view details)

Uploaded CPython 3.10Windows x86

windows_cap-0.1.2-cp39-none-win_amd64.whl (157.3 kB view details)

Uploaded CPython 3.9Windows x86-64

windows_cap-0.1.2-cp39-none-win32.whl (152.6 kB view details)

Uploaded CPython 3.9Windows x86

windows_cap-0.1.2-cp38-none-win_amd64.whl (156.8 kB view details)

Uploaded CPython 3.8Windows x86-64

windows_cap-0.1.2-cp38-none-win32.whl (152.3 kB view details)

Uploaded CPython 3.8Windows x86

File details

Details for the file windows_cap-0.1.2.tar.gz.

File metadata

  • Download URL: windows_cap-0.1.2.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.4.0

File hashes

Hashes for windows_cap-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2d74a904b848295fc06d4014446e89073952d2c041e6430b0bbdb7a56240b086
MD5 2bcf81e4314a43925060381730100b03
BLAKE2b-256 7563c4a373d17db34a2f26fcf1debb6d527df5a406e57ef95f867285d01fb57b

See more details on using hashes here.

File details

Details for the file windows_cap-0.1.2-cp312-none-win_amd64.whl.

File metadata

File hashes

Hashes for windows_cap-0.1.2-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 af5cc8f523cafdacaa093203323011c6daf3bc646177b5146e846abb1e68d1d9
MD5 54b19ae48a957217f22b227abdedfcce
BLAKE2b-256 37a9dc3a4f844ec6646b613a0fb22fc4720d02005d15cef0db4e418a6c2b37d8

See more details on using hashes here.

File details

Details for the file windows_cap-0.1.2-cp312-none-win32.whl.

File metadata

  • Download URL: windows_cap-0.1.2-cp312-none-win32.whl
  • Upload date:
  • Size: 152.6 kB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.4.0

File hashes

Hashes for windows_cap-0.1.2-cp312-none-win32.whl
Algorithm Hash digest
SHA256 71707abd71438bf5e2e8a8ed85cc575070f443c327f76c38543007d2798443a5
MD5 b2909eafdcb3f0c544a161707009be78
BLAKE2b-256 43241a13893698b4383f7241d8444bbdcebc5ee2bcec0358d53f002a7ab4b79a

See more details on using hashes here.

File details

Details for the file windows_cap-0.1.2-cp311-none-win_amd64.whl.

File metadata

File hashes

Hashes for windows_cap-0.1.2-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 b46f896371fd1604312ceac428392fd165ec5afaf8cb303c0227a59072b5f526
MD5 a8eb0604f3da2f38f50940563aa7556e
BLAKE2b-256 579386f5f41c7612db0ac7418e79b016e7580c7f0d975fb4e1094b476972d469

See more details on using hashes here.

File details

Details for the file windows_cap-0.1.2-cp311-none-win32.whl.

File metadata

  • Download URL: windows_cap-0.1.2-cp311-none-win32.whl
  • Upload date:
  • Size: 152.5 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.4.0

File hashes

Hashes for windows_cap-0.1.2-cp311-none-win32.whl
Algorithm Hash digest
SHA256 ef39101164e9b592a9499a1050558d3219e7028db55b8528c61971e58f7594f0
MD5 8771075d283eec2941b70d4737673724
BLAKE2b-256 ced9f21c8abb75048c10f3b794341977531f5ef553f87ad5e78f9feccfcc4489

See more details on using hashes here.

File details

Details for the file windows_cap-0.1.2-cp310-none-win_amd64.whl.

File metadata

File hashes

Hashes for windows_cap-0.1.2-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 daae22d0ad18400c68e07c465ee59c8fac60e9036f80afe5c99b920e3b2143da
MD5 b63ade099f9c7bcf858d3d113a82eef2
BLAKE2b-256 ec666ce765015bc3a135a67b487093175c294b41fd9688bd89cb8d117538d23e

See more details on using hashes here.

File details

Details for the file windows_cap-0.1.2-cp310-none-win32.whl.

File metadata

  • Download URL: windows_cap-0.1.2-cp310-none-win32.whl
  • Upload date:
  • Size: 152.5 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.4.0

File hashes

Hashes for windows_cap-0.1.2-cp310-none-win32.whl
Algorithm Hash digest
SHA256 0fe69d77c994d351e5567b832d1306d7ceb33a283102fa3684be1ffdf3262aa8
MD5 bb704954d3613c670ee4c8633e89aae3
BLAKE2b-256 2943ece91f90e115148256aa2cf2244f81ca254f506d6618ad9fa3c406b285bc

See more details on using hashes here.

File details

Details for the file windows_cap-0.1.2-cp39-none-win_amd64.whl.

File metadata

File hashes

Hashes for windows_cap-0.1.2-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 32ec54685fafe3e7a95bf6b42e048cb8ccc461b5cbad7054b2492b37b31d0fa6
MD5 da462c05dbdaaab4b2e541d911b1de9b
BLAKE2b-256 c9b52f0add535e4ad5bdfab56d97e54bb7d423a6bf20316f478d8e37743be8e0

See more details on using hashes here.

File details

Details for the file windows_cap-0.1.2-cp39-none-win32.whl.

File metadata

  • Download URL: windows_cap-0.1.2-cp39-none-win32.whl
  • Upload date:
  • Size: 152.6 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.4.0

File hashes

Hashes for windows_cap-0.1.2-cp39-none-win32.whl
Algorithm Hash digest
SHA256 02d00705ed63411c0adb3aaf70be78be65db9f9c33a86301218570e97eae1296
MD5 279649d8b0013dbf55ff9781b8e4c973
BLAKE2b-256 13817204f293df69f7862aafb4977378de2e5e015d0184ff87bd9eb7ed663228

See more details on using hashes here.

File details

Details for the file windows_cap-0.1.2-cp38-none-win_amd64.whl.

File metadata

File hashes

Hashes for windows_cap-0.1.2-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 37318a9e1dcdd248f273aaf71129a5458fe3a9f8db56a4fe8d558434b1231710
MD5 7ec60d10ca88ba23b25c096ae780f7dc
BLAKE2b-256 d6942088ca9c27601866bed58b625791b0138e25af44e84e5fede7b1f756409c

See more details on using hashes here.

File details

Details for the file windows_cap-0.1.2-cp38-none-win32.whl.

File metadata

  • Download URL: windows_cap-0.1.2-cp38-none-win32.whl
  • Upload date:
  • Size: 152.3 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.4.0

File hashes

Hashes for windows_cap-0.1.2-cp38-none-win32.whl
Algorithm Hash digest
SHA256 60919508388ecfe4d95bc8c2071d058c022bb4a7f6697af30c3d085d56600d8f
MD5 8b56983ea8ce10816324fc71a051eb7d
BLAKE2b-256 e185a481421b03520c9ea7e3a504ae24bdc06ba4be4a6a7124435194ecbb0135

See more details on using hashes here.

Supported by

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