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.denoise()

Denoise 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.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.show([title: str])

Displays the image.


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.3.1.tar.gz (12.5 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.3.1-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for screeny-0.3.1.tar.gz
Algorithm Hash digest
SHA256 2df1b48fcd4fe5f410f8a8fd35f09282689281b16347a60b66b17ac81bb1b528
MD5 bd7a7336e9d3a81806780e37001ddb8a
BLAKE2b-256 e4cef6c7567ff023274a76b712e57412cf60757a7f4739d02009e829d5367788

See more details on using hashes here.

File details

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

File metadata

  • Download URL: screeny-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 14.3 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.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 02ed0af6d623c14111de2f60d2426d85c872c220a4f5310aeca4b5a4de0ec717
MD5 e852c82775780b2e6a0d6b3075e44906
BLAKE2b-256 98911c9dd3bba1dcb615b71a5a9adf69688d6d40eda6a303602d87c0bb3e93eb

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