Skip to main content

A simple python library for working with screens and images.

Project description

Screeny

A simple python library for working with screens and images.

Installation

pip install screeny

Usage

from screeny import Screeny

sc = Screeny()
img = sc.take_screenshot()

API-Reference

Screeny-class

Screeny.get_mouse_pos()

Returns the current position of the mouse as a tuple of xy-coordinates.


Screeny.locate_image(image: str | np.ndarray | Image [, rect: Rect, confidence: float])

Search for an image on the screen. Returns the location of the found image in pixel or False, if no image was found.


Screeny.read_text(rect: Rect)

Reads text from a given area on the screen. Returns the founded text as string.


Screeny.take_screenshot([rect: Rect])

Takes a screenshot of the complete monitor or a given area as "rect". Returns an Image-Instance.

Image-Class

Image.init(image: str | np.ndarray | Image)

Creates a new instance of the Image-Class.


Image.binarize(method: str[, threshold: int])

Binarize the image.


Image.compute_descriptors()

Computes the descriptors of the image.


Image.denoise()

Denoise the image.


Image.detect_features()

Finds features (keypoints and descriptors) in the image.


Image.detect_keypoints()

Finds the keypoints of the image.


Image.get_data()

Returns the pixels as numpy-array.


Image.invert()

Inverts the image.


Image.locate_image(image_to_find: str | np.ndarray | Image[, confidence: float])

Locates an second image in the image and returns the position of the founded image or False if no image was found.


Image.match_features(image_to_find: str | np.ndarray | Image)

Matches the features of the image with another image.


Image.read_text([resize_factor: int, whitelist: str])

Reads the text from the image.


Image.resize(factor: int)

Resizes the image with a given factor.


Image.save(title: str[, path: str])

Saves the image on the disk in a given path with a given title. If no path is specified, the file be saved in the current active directory.


Image.show([title: str])

Displays the image.


Image.show_matches(image_to_find: str | np.ndarray | Image, matches: list)

Show the two images with matches as lines connect points.


Image.to_grayscale()

Converts the image to grayscale.


Image.to_hsv()

Converts the image to HSV.

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

screeny-0.4.1.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

screeny-0.4.1-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file screeny-0.4.1.tar.gz.

File metadata

  • Download URL: screeny-0.4.1.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for screeny-0.4.1.tar.gz
Algorithm Hash digest
SHA256 2631e49ac68be4525facba094be3b2bbe0b762c76412953865b5273b67aa663f
MD5 856935783d6824939674c1bcddcbf08e
BLAKE2b-256 b522981fb73c23b0c4a5d195d4245e8294c03a89ee6dfaa7e61e5b8779dbf5d0

See more details on using hashes here.

File details

Details for the file screeny-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: screeny-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for screeny-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 37dc5772a2ff8286b64d2b7694459fdc4664ace23af2e2c64755cc879db85b06
MD5 3e65c866774cb6aed045972930db5f25
BLAKE2b-256 c4de02322b35faa857190d396dc8c7322843d89c99c45d3b3848c1a633ba0f56

See more details on using hashes here.

Supported by

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