D3DShot | Extremely fast and robust screen capture | Image Editing library
kandi X-RAY | D3DShot Summary
kandi X-RAY | D3DShot Summary
D3DShot is a pure Python implementation of the Windows Desktop Duplication API. It leverages DXGI and Direct3D system libraries to enable extremely fast and robust screen capture functionality for your Python scripts and applications on Windows.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Gets the D3D output frame .
- Return a list of all the display devices .
- Initialize the specified backend .
- Initialize instance .
- Returns a mapping of device names to their respective display devices .
- Process image .
- Given a dg_output describe the details of the output .
- Prepares a D3D11 .
- Initializes a d3d device .
- Determine available capture outputs .
D3DShot Key Features
D3DShot Examples and Code Snippets
Community Discussions
Trending Discussions on D3DShot
QUESTION
I've come across this strange error with Pillow, where the import name PIL
needs to be all lowercase instead of all uppercase, but I've never seen pil
used lowercase anywhere. This means that all the python packages and files that I use that import PIL
don't work and throw a ModuleNotFoundError: No module named 'PIL'
. However when change "PIL" to "pil", the import works.
Pillow version = 9.0.0
Python version = 3.9.1
I came across this error after trying to install d3dshot package. Installing d3dshot using pip threw an error about a missing zlib dependency for Pillow, and I followed this answer to successfully install d3dshot. After that, I started encountering this PIL error.
...ANSWER
Answered 2022-Jan-28 at 06:19Several references suggest capitalizing Pillow
when installing it via pip, including the official documentation, PyPi, and a lot of related stack overflow posts e.g. 1.
I'd suggest trying Pillow = ">=7.1.2"
with a capital P in the pyproject.toml.
For anyone else with this issue, uninstalling pillow
and ensuring it is installed using Pillow
might resolve the issue.
QUESTION
Long story short - I'm learning how to do simple screen capture with this D3DShot (Python implementation of the Windows Desktop Duplication API) library and pass the captured data straight to OpenCV.
Captured data is np.ndarray
of dtype
uint8
with values in range (0, 255)
. I've tried multiple suggestions here on Stack Overflow and other websites, but couldn't wrap my finger around this and constantly run into errors.
Here is my current code:
...ANSWER
Answered 2020-Sep-10 at 04:46So the reason was very simple.. D3DShot capture needed some delay (I set it to 100
ms) to initialize and the array finally wasn't empty and passed succesfully to OpenCV.
Here is the updated code:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install D3DShot
comtypes: Internal use. To preserve developer sanity while working with COM interfaces.
Pillow: Default Capture Output. Also used to save to disk as PNG and JPG.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page