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 - Wheel PyPI - Python Version

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

Recompile the C++ project

hatch run compile

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.

Manual CMake build

cmake -S . -B cmake-build-release -G Ninja
cmake --build cmake-build-release -j 8
cmake --install cmake-build-release --prefix src

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.4.tar.gz (197.4 kB view details)

Uploaded Source

Built Distributions

blurhash_pyside-0.2.4-cp312-cp312-win_amd64.whl (64.4 kB view details)

Uploaded CPython 3.12 Windows x86-64

blurhash_pyside-0.2.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (70.9 kB view details)

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

blurhash_pyside-0.2.4-cp312-cp312-macosx_11_0_x86_64.whl (62.9 kB view details)

Uploaded CPython 3.12 macOS 11.0+ x86-64

blurhash_pyside-0.2.4-cp312-cp312-macosx_11_0_arm64.whl (56.6 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

blurhash_pyside-0.2.4-cp311-cp311-win_amd64.whl (64.2 kB view details)

Uploaded CPython 3.11 Windows x86-64

blurhash_pyside-0.2.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (71.9 kB view details)

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

blurhash_pyside-0.2.4-cp311-cp311-macosx_11_0_x86_64.whl (64.2 kB view details)

Uploaded CPython 3.11 macOS 11.0+ x86-64

blurhash_pyside-0.2.4-cp311-cp311-macosx_11_0_arm64.whl (57.3 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

blurhash_pyside-0.2.4-cp310-cp310-win_amd64.whl (63.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

blurhash_pyside-0.2.4-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (70.0 kB view details)

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

blurhash_pyside-0.2.4-cp310-cp310-macosx_11_0_x86_64.whl (62.9 kB view details)

Uploaded CPython 3.10 macOS 11.0+ x86-64

blurhash_pyside-0.2.4-cp310-cp310-macosx_11_0_arm64.whl (56.0 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

blurhash_pyside-0.2.4-cp39-cp39-win_amd64.whl (62.7 kB view details)

Uploaded CPython 3.9 Windows x86-64

blurhash_pyside-0.2.4-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (70.2 kB view details)

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

blurhash_pyside-0.2.4-cp39-cp39-macosx_11_0_x86_64.whl (62.9 kB view details)

Uploaded CPython 3.9 macOS 11.0+ x86-64

blurhash_pyside-0.2.4-cp39-cp39-macosx_11_0_arm64.whl (56.1 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

File details

Details for the file blurhash_pyside-0.2.4.tar.gz.

File metadata

  • Download URL: blurhash_pyside-0.2.4.tar.gz
  • Upload date:
  • Size: 197.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for blurhash_pyside-0.2.4.tar.gz
Algorithm Hash digest
SHA256 f8b5668c7c499827ceba2df1a34a84921533ada23f71701db0bf3a76b3104a61
MD5 9a42104cd3d0c2acd794d00f22c0b5e1
BLAKE2b-256 67a9c076bbf52ed5c4c2b044248e51590882fcf78293eb50dab6b5173a708f2e

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.4-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4a16cfb4a385226252b5b311aacadb9e7871b983b414ce1f7f734de3d0dba55a
MD5 b85b13319573c383bf15d9b0a031d7bf
BLAKE2b-256 098bb37f24c122c5c7a09a041f7c36c170689995d44b3b9c8a092afa8aea4555

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 06665bf8a4b43c73006edd167ea08ded619a23ecaaf8fed4b497a88cdad165f7
MD5 b6dcf229338729dde3e5cfb75b422545
BLAKE2b-256 0fbdd66b31478d14627ef949cc45565cc61f0e361869ea4cc175862dbaa375d4

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.4-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.4-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 47d46da6f2982c0f7ee2afe1e6c444dd889ae9b3c7c7c976cb37e57537ee898b
MD5 b18330141b3afd82e51bda77faaf0d39
BLAKE2b-256 5431ae3a3913697f77e62fbbaa2238a974be85ee763503eebce010d866eba6ac

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.4-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 83b0d13202cc0f925a84215f006a3ba3bc84624230c15e6c22c2022f02f8c57e
MD5 ad234d24aa5eecf5d6cf4811cb426283
BLAKE2b-256 4798760f6acd7ee863118574a46b53f1b74653d1382247552aa68535aeeb2f81

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.4-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1f99995eba8ff9a7aad8f427a3b2bbd05e79d412f468d0d308b4d587d27cc9c0
MD5 e5bf43e1a18a9903f820ddf02b4f867b
BLAKE2b-256 d89899bb4f35e58dd1c7bd29a036c75fe9e5317bb715053bf2844464341251e6

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 59496730e725611cc89c73583c141fb5e61fb0b16972eb044c7545e3279839d7
MD5 58201d6ca355c9737ba9c7d19a324402
BLAKE2b-256 14e6ab290f888578f1658c0a699a7c165ff0f69081c9b1d34c0516ff43a480e5

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.4-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.4-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 8cb73a6c85c359cacf91b6f59973ce4e790831f0419af481d87bd9fda5b7d984
MD5 44da160f9d3db1ce8d002f63d38a4a6f
BLAKE2b-256 8684370cba4379fb5740cd3af141f1a69566f84a21e598b4b56ca02a49cc4c3f

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.4-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d9eab356e7fe26bd10b3f01a039f624c744fa78420799d695c7fa6db24734c66
MD5 33fba716ad91520bb0e9163a4c4067df
BLAKE2b-256 dd4e9cbe6fb1e37b2fad8966222a8761cda1a2f98fcfaf697fb31f48222fd6b2

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.4-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 174d84f1f8bc749ed96e04d7e21aac297e96a1c030fd8095043115f88b4f0f8b
MD5 fdbcb37ac47951d10d2cd1d56f29b536
BLAKE2b-256 457b2a6acf9555f0dfe0f2ecc0058e497e3c2558f3428d7603effbb50f103697

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.4-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.4-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 06a9bd6b62c6d38bf527b498b3d695d6119b88ec5663b8214a0c113651d77800
MD5 783beb3b807f995aaaebfbd7a9d8f40b
BLAKE2b-256 7a4e4607bfac06fdb2b27b6922c855fc9741e2e6f6aed2f0030379b9adf1613b

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.4-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.4-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 163dad490547d081882cf0c80a9430b968279d8111a5bc33364bdaeec5170c90
MD5 a7e3009b2b83af9d496a05deec844785
BLAKE2b-256 bb122de73eaecf05ea93a0d2bd7b4221059e266adaa47d0ea993220cafa290e4

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.4-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7641559efa1d0cdf197de3983f4ec0c7569f53ff1f36fdab5e6eb723da217cd0
MD5 7a93336ef70a971473bb6808aa70f497
BLAKE2b-256 df28fae95c59cc210557b5dde854cb725096f5ea9db70985ddc0349b24680d64

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.4-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4f38f1ff93c6465b1fce3f16f0fae0d78f0073a7a0e7c363c1b0bb6d8aa18b91
MD5 2f492d3ac0d65077d1de6cf10f5a509f
BLAKE2b-256 b19abba073cb577027cb7c10658aec638e6728e4cf3fcf97cbe28bf6b98dae7a

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.4-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.4-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4706e6284b8418b908d15285923b0726b98c0274449e24bb79eff92900747eeb
MD5 97d47b0bb9605a4dcf134592526926c7
BLAKE2b-256 1cb66cb0f28025d4375096f994f584e736eaa2fdf6c5ef8ae0e7ca8b13149a85

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.4-cp39-cp39-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.4-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 810ce66f99e4f187d551907bbe139b683e59384e262a0543d3e5cd443a0d0ecb
MD5 bce9e6353b9e08c421037a0d2ff521ee
BLAKE2b-256 4c2959970100d1cf014db0af4452f5c920d46d095c0deefea00de998d6fb0b5f

See more details on using hashes here.

File details

Details for the file blurhash_pyside-0.2.4-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for blurhash_pyside-0.2.4-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 acb27733059da6423ad9c11d16279a8ca9951b1829878708eb1fbe02d9dc9664
MD5 9b2c9fc8a06dd57e313986991807075a
BLAKE2b-256 d9c7721de5fc49619f5c16ed6cc5e8a81f71edb05d89c386f16cbac01ff6e48b

See more details on using hashes here.

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