Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
windows-capture
Readme
Windows Capture is a highly efficient Rust and Python library that enables you to capture the screen using the Graphics Capture API effortlessly. This library allows you to easily capture the screen of your Windows-based computer and use it for various purposes, such as creating instructional videos, taking screenshots, or recording your gameplay. With its intuitive interface and robust functionality, Windows Capture is an excellent choice for anyone looking for a reliable, easy-to-use screen-capturing solution.
Note this README.md is for Python library Rust library can be found here
Run this command
pip install windows-capture
from windows_capture import WindowsCapture, Frame, InternalCaptureControl
# Every Error From on_closed and on_frame_arrived Will End Up Here
capture = WindowsCapture(
cursor_capture=None,
draw_border=None,
monitor_index=None,
window_name=None,
)
# Called Every Time A New Frame Is Available
@capture.event
def on_frame_arrived(frame: Frame, capture_control: InternalCaptureControl):
print("New Frame Arrived")
# Save The Frame As An Image To The Specified Path
frame.save_as_image("image.png")
# Gracefully Stop The Capture Thread
capture_control.stop()
# Called When The Capture Item Closes Usually When The Window Closes, Capture
# Session Will End After This Function Ends
@capture.event
def on_closed():
print("Capture Session Closed")
capture.start()
Windows Capture Is The Fastest Python Screen Capture Library
Contributions are welcome! If you find a bug or want to add new features to the library, please open an issue or submit a pull request.
This project is licensed under the MIT License.
FAQs
Fastest Windows Screen Capture Library For Python 🔥
We found that windows-capture demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.