Skip to main content

Encode or Decode Blurhash strings in a PySide2/6 project.

Project description

blurhash-pyside

GitHub License GitHub Actions Workflow Status GitHub Release PyPI - Version PyPI - Python Version PyPI - Wheel

Blurhash encoding and decoding for PySide2/6

  • Encode a QImage or QPixmap into a blurhash string
  • Decode a blruhash string into a QImage or QPixmap

For more information about Blurhash visit their official page.

Local Development

Requirements:

  • Python 3.9+
  • Hatch
  • CMake 3.27+

Run the example:

# choose one:
hatch run pyside6:example

# pyside2 may not be available for all python versions or platforms
hatch run pyside2:example

Setup your local environment

Create a repo relative .venv/ dir:

hatch env create

Run the tests:

hatch test

Build the wheel for your platform:

hatch build -t wheel

The cmake project is not intended to be run on its own but it is possible to do it. The pybind11 dependency will be available after creating the default virtual environment and passing its python executable path to cmake via Python_EXECUTABLE. Some IDE's may do this for you when a python environment is activated in their configuration.

Acknowledgements

The core C++ code for the blurhash functions was source from https://github.com/Nheko-Reborn/blurhash under the Boost Software License. Some minor modifications were made.

This project is made possible by pybind11 and scikit-build-core. Multi-platform wheels are generated using the cibuildwheel project.

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

blurhash_pyside-0.2.0.tar.gz (197.2 kB view hashes)

Uploaded Source

Built Distributions

blurhash_pyside-0.2.0-cp312-cp312-win_amd64.whl (67.8 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

blurhash_pyside-0.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (70.7 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

blurhash_pyside-0.2.0-cp312-cp312-macosx_11_0_x86_64.whl (58.6 kB view hashes)

Uploaded CPython 3.12 macOS 11.0+ x86-64

blurhash_pyside-0.2.0-cp312-cp312-macosx_11_0_arm64.whl (56.3 kB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

blurhash_pyside-0.2.0-cp311-cp311-win_amd64.whl (67.5 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

blurhash_pyside-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (71.5 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

blurhash_pyside-0.2.0-cp311-cp311-macosx_11_0_x86_64.whl (60.0 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ x86-64

blurhash_pyside-0.2.0-cp311-cp311-macosx_11_0_arm64.whl (56.9 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

blurhash_pyside-0.2.0-cp310-cp310-win_amd64.whl (66.4 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

blurhash_pyside-0.2.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (69.9 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

blurhash_pyside-0.2.0-cp310-cp310-macosx_11_0_x86_64.whl (58.6 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ x86-64

blurhash_pyside-0.2.0-cp310-cp310-macosx_11_0_arm64.whl (55.6 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

blurhash_pyside-0.2.0-cp39-cp39-win_amd64.whl (66.4 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

blurhash_pyside-0.2.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (69.8 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

blurhash_pyside-0.2.0-cp39-cp39-macosx_11_0_x86_64.whl (58.8 kB view hashes)

Uploaded CPython 3.9 macOS 11.0+ x86-64

blurhash_pyside-0.2.0-cp39-cp39-macosx_11_0_arm64.whl (55.7 kB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

Supported by

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