Skip to main content

A library to detect if an image is likely pixel art.

Project description

PyxelArt Detector

PyxelArt Detector is a Python library for analyzing images to determine if they qualify as pixel art.

$ python3 -m pyxelart_detector ./example.png
True

Features

  • Accurate Detection: Uses FFT-based transformations and a tailored cross-kernel approach to identify pixel art. Reach out via the issues, if you think the library misclassified an image.
  • Simple API: I don't like "complicated", so here you go:
    • is_pixel_art(filepath: Path) -> bool
    • is_pixel_art_numpy(image: np.ndarray) -> bool

Installation

Install via uv/pip:

uv add pyxelart-detector
# or
pip install pyxelart-detector

Usage

After installation, import and use the library in your projects as follows:

from pyxelart_detector import is_pixel_art, is_pixel_art_numpy

# Example using the file-based API
result = is_pixel_art("path/to/your/image.png")
if result:
    print("This is pixel art!")
else:
    print("Not pixel art.")

# Example using the NumPy-based API
import matplotlib.pyplot as plt
image = plt.imread("path/to/your/image.png")
if is_pixel_art_numpy(image):
    print("This is pixel art!")
else:
    print("Not pixel art.")

Contributing

Contributions are welcome! If you have ideas or improvements, please open an issue or submit a pull request on GitHub.

Acknowledgments

This library is built on excellent open-source tools, including NumPy, Matplotlib, and others.

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

pyxelart_detector-0.1.1.tar.gz (20.0 kB view details)

Uploaded Source

Built Distribution

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

pyxelart_detector-0.1.1-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file pyxelart_detector-0.1.1.tar.gz.

File metadata

  • Download URL: pyxelart_detector-0.1.1.tar.gz
  • Upload date:
  • Size: 20.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.1

File hashes

Hashes for pyxelart_detector-0.1.1.tar.gz
Algorithm Hash digest
SHA256 59f0a04d51217489ed8ddbb2c307537bce90f92920e9d0e98409790b297e34ab
MD5 95dceb656a161c9b29b2409269b5c3cd
BLAKE2b-256 ec7dd2d8152265329ac916c5f72dc9b4214a1d105df4e7c644ee3627f0b08a5d

See more details on using hashes here.

File details

Details for the file pyxelart_detector-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pyxelart_detector-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f05dea9d49709f06e0aa371a7e98de8dda8df141392b7f736141bc61d51d8960
MD5 3b4e8d995df5509a42d7361ebf461877
BLAKE2b-256 c84b664f4fc78d55a38c8bd781af8b731c540d4ceef9d3e7b20d5495866a8c5c

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