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
Metadata
Release files for windows-cap 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| windows_cap-0.1.2.tar.gz | 12.0 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| windows_cap-0.1.2-cp312-none-win_amd64.whl | CPython 3.12 | none | Windows x86-64 | Details |
| windows_cap-0.1.2-cp312-none-win32.whl | CPython 3.12 | none | Windows x86-32 | Details |
| windows_cap-0.1.2-cp311-none-win_amd64.whl | CPython 3.11 | none | Windows x86-64 | Details |
| windows_cap-0.1.2-cp311-none-win32.whl | CPython 3.11 | none | Windows x86-32 | Details |
| windows_cap-0.1.2-cp310-none-win_amd64.whl | CPython 3.10 | none | Windows x86-64 | Details |
| windows_cap-0.1.2-cp310-none-win32.whl | CPython 3.10 | none | Windows x86-32 | Details |
| windows_cap-0.1.2-cp39-none-win_amd64.whl | CPython 3.9 | none | Windows x86-64 | Details |
| windows_cap-0.1.2-cp39-none-win32.whl | CPython 3.9 | none | Windows x86-32 | Details |
| windows_cap-0.1.2-cp38-none-win_amd64.whl | CPython 3.8 | none | Windows x86-64 | Details |
| windows_cap-0.1.2-cp38-none-win32.whl | CPython 3.8 | none | Windows x86-32 | Details |
Total release size: 1.6 MB
Release files / windows_cap-0.1.2.tar.gz
| Download URL | windows_cap-0.1.2.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d74a904b848295fc06d4014446e89073952d2c041e6430b0bbdb7a56240b086
|
|
BLAKE2b-256 checksum How to use checksums |
7563c4a373d17db34a2f26fcf1debb6d527df5a406e57ef95f867285d01fb57b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.4.0
|
Release files / windows_cap-0.1.2-cp312-none-win_amd64.whl
| Download URL | windows_cap-0.1.2-cp312-none-win_amd64.whl |
|---|---|
| Size | 157.5 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
af5cc8f523cafdacaa093203323011c6daf3bc646177b5146e846abb1e68d1d9
|
|
BLAKE2b-256 checksum How to use checksums |
37a9dc3a4f844ec6646b613a0fb22fc4720d02005d15cef0db4e418a6c2b37d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.4.0
|
Release files / windows_cap-0.1.2-cp312-none-win32.whl
| Download URL | windows_cap-0.1.2-cp312-none-win32.whl |
|---|---|
| Size | 152.6 kB |
| Tags | CPython 3.12 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
71707abd71438bf5e2e8a8ed85cc575070f443c327f76c38543007d2798443a5
|
|
BLAKE2b-256 checksum How to use checksums |
43241a13893698b4383f7241d8444bbdcebc5ee2bcec0358d53f002a7ab4b79a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.4.0
|
Release files / windows_cap-0.1.2-cp311-none-win_amd64.whl
| Download URL | windows_cap-0.1.2-cp311-none-win_amd64.whl |
|---|---|
| Size | 157.0 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b46f896371fd1604312ceac428392fd165ec5afaf8cb303c0227a59072b5f526
|
|
BLAKE2b-256 checksum How to use checksums |
579386f5f41c7612db0ac7418e79b016e7580c7f0d975fb4e1094b476972d469
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.4.0
|
Release files / windows_cap-0.1.2-cp311-none-win32.whl
| Download URL | windows_cap-0.1.2-cp311-none-win32.whl |
|---|---|
| Size | 152.5 kB |
| Tags | CPython 3.11 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
ef39101164e9b592a9499a1050558d3219e7028db55b8528c61971e58f7594f0
|
|
BLAKE2b-256 checksum How to use checksums |
ced9f21c8abb75048c10f3b794341977531f5ef553f87ad5e78f9feccfcc4489
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.4.0
|
Release files / windows_cap-0.1.2-cp310-none-win_amd64.whl
| Download URL | windows_cap-0.1.2-cp310-none-win_amd64.whl |
|---|---|
| Size | 157.0 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
daae22d0ad18400c68e07c465ee59c8fac60e9036f80afe5c99b920e3b2143da
|
|
BLAKE2b-256 checksum How to use checksums |
ec666ce765015bc3a135a67b487093175c294b41fd9688bd89cb8d117538d23e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.4.0
|
Release files / windows_cap-0.1.2-cp310-none-win32.whl
| Download URL | windows_cap-0.1.2-cp310-none-win32.whl |
|---|---|
| Size | 152.5 kB |
| Tags | CPython 3.10 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
0fe69d77c994d351e5567b832d1306d7ceb33a283102fa3684be1ffdf3262aa8
|
|
BLAKE2b-256 checksum How to use checksums |
2943ece91f90e115148256aa2cf2244f81ca254f506d6618ad9fa3c406b285bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.4.0
|
Release files / windows_cap-0.1.2-cp39-none-win_amd64.whl
| Download URL | windows_cap-0.1.2-cp39-none-win_amd64.whl |
|---|---|
| Size | 157.3 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
32ec54685fafe3e7a95bf6b42e048cb8ccc461b5cbad7054b2492b37b31d0fa6
|
|
BLAKE2b-256 checksum How to use checksums |
c9b52f0add535e4ad5bdfab56d97e54bb7d423a6bf20316f478d8e37743be8e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.4.0
|
Release files / windows_cap-0.1.2-cp39-none-win32.whl
| Download URL | windows_cap-0.1.2-cp39-none-win32.whl |
|---|---|
| Size | 152.6 kB |
| Tags | CPython 3.9 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
02d00705ed63411c0adb3aaf70be78be65db9f9c33a86301218570e97eae1296
|
|
BLAKE2b-256 checksum How to use checksums |
13817204f293df69f7862aafb4977378de2e5e015d0184ff87bd9eb7ed663228
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.4.0
|
Release files / windows_cap-0.1.2-cp38-none-win_amd64.whl
| Download URL | windows_cap-0.1.2-cp38-none-win_amd64.whl |
|---|---|
| Size | 156.8 kB |
| Tags | CPython 3.8 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
37318a9e1dcdd248f273aaf71129a5458fe3a9f8db56a4fe8d558434b1231710
|
|
BLAKE2b-256 checksum How to use checksums |
d6942088ca9c27601866bed58b625791b0138e25af44e84e5fede7b1f756409c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.4.0
|
Release files / windows_cap-0.1.2-cp38-none-win32.whl
| Download URL | windows_cap-0.1.2-cp38-none-win32.whl |
|---|---|
| Size | 152.3 kB |
| Tags | CPython 3.8 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
60919508388ecfe4d95bc8c2071d058c022bb4a7f6697af30c3d085d56600d8f
|
|
BLAKE2b-256 checksum How to use checksums |
e185a481421b03520c9ea7e3a504ae24bdc06ba4be4a6a7124435194ecbb0135
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.4.0
|