New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nativecap

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nativecap

Native screen capture module

  • 1.0.3
  • PyPI
  • Socket score

Maintainers
1

nativecap

Take a screenshot with Python, natively, using a method based on that answer.

Setup

pip install nativecap

Usage

import nativecap

# outputs an array containing pixel colors in the BGRA format
buffer = nativecap.capture(top_left_x, top_left_y, width, height)

Example

import cv2
import numpy as np
import nativecap
import platform


x = 0
y = 0
width = 640
height = 480

buffer = nativecap.capture(x, y, width, height)
image = np.ctypeslib.as_array(buffer)
image = image.reshape(width, height, 4)

cv2.imshow("image", image)
cv2.waitKey(0)

FAQs


Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc