hqx 1.0

Creator: rpa-with-ash

Last updated:

Add to Cart

Description:

hqx 1.0

hqx (high quality scale) is a family of pixel art scaling algorithms that work
by detecting differences between pixels in the YUV colorspace.
hq2x scales an image by 2x, hq3x by 3x, and hq4x by 4x.
This is a Python port of hqx, unoptimized.
It is not intended to be used for videos or scenarios where low latency is required.
Right now, it only supports RGB, not RGBA (no transparency support).

Table of contents

📦 Installation
🛠 Usage
📰 Changelog
📜 License


📦 Installation
hqx is available on PyPi.
It requires a Python version of at least 3.10.0.
It depends on Pillow.
To install hqx with pip, run:
python -m pip install hqx


🛠 Usage
You can either use hqx.hqx_scale, hqx.hq2x, hqx.hq3x, or hqx.hq4x.
import hqx
import PIL.Image

image: PIL.Image.Image = PIL.Image.open(...)
x2: PIL.Image.Image = hqx.hq2x(image)
x3: PIL.Image.Image = hqx.hq3x(image)
x4: PIL.Image.Image = hqx.hq4x(image)

# x2 == hqx.hqx_scale(image, 2))
# x3 == hqx.hqx_scale(image, 3))
# x4 == hqx.hqx_scale(image, 4))


📰 Changelog
The changelog is at CHANGELOG.md.

📜 License
hqx (python) is licensed under the Lesser GNU Public License v2.1 (LGPL-2.1).

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.