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

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

Uploaded Source

Built Distributions

blurhash_pyside-0.2.3-cp312-cp312-win_amd64.whl (68.3 kB view details)

Uploaded CPython 3.12 Windows x86-64

blurhash_pyside-0.2.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (71.0 kB view details)

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

blurhash_pyside-0.2.3-cp312-cp312-macosx_11_0_x86_64.whl (63.0 kB view details)

Uploaded CPython 3.12 macOS 11.0+ x86-64

blurhash_pyside-0.2.3-cp312-cp312-macosx_11_0_arm64.whl (56.7 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

blurhash_pyside-0.2.3-cp311-cp311-win_amd64.whl (68.1 kB view details)

Uploaded CPython 3.11 Windows x86-64

blurhash_pyside-0.2.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (72.0 kB view details)

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

blurhash_pyside-0.2.3-cp311-cp311-macosx_11_0_x86_64.whl (64.3 kB view details)

Uploaded CPython 3.11 macOS 11.0+ x86-64

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

Uploaded CPython 3.11 macOS 11.0+ ARM64

blurhash_pyside-0.2.3-cp310-cp310-win_amd64.whl (67.0 kB view details)

Uploaded CPython 3.10 Windows x86-64

blurhash_pyside-0.2.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (70.1 kB view details)

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

blurhash_pyside-0.2.3-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.3-cp310-cp310-macosx_11_0_arm64.whl (56.1 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

blurhash_pyside-0.2.3-cp39-cp39-win_amd64.whl (66.9 kB view details)

Uploaded CPython 3.9 Windows x86-64

blurhash_pyside-0.2.3-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.3-cp39-cp39-macosx_11_0_x86_64.whl (63.0 kB view details)

Uploaded CPython 3.9 macOS 11.0+ x86-64

blurhash_pyside-0.2.3-cp39-cp39-macosx_11_0_arm64.whl (56.2 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: blurhash_pyside-0.2.3.tar.gz
  • Upload date:
  • Size: 197.0 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.3.tar.gz
Algorithm Hash digest
SHA256 8e9613e5a352c4c4fd60c5f1503d1f309c0f982f9d3fa96edf226384a702497a
MD5 148b31b84af24051a1026813c2cbf79e
BLAKE2b-256 953fbe6fca02a9c73e93459b443fe839f6f9f20a658c35d59722e679dece4cdc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for blurhash_pyside-0.2.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 66c01fa49ffc4ece94b57b267a68f45116193aee4caad3a52375622684afcf5e
MD5 493203b109c210ea16e28adb3d8e61aa
BLAKE2b-256 d721923c025d4485ffb477de52a039c9f7e1d48636681860af6217165da11b0b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for blurhash_pyside-0.2.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0dbaad94f240d2ff76880a86887816dfa629bd458fbbab3c58ec3eafc6c55239
MD5 557af1b26f59c0413cc2f513da94774e
BLAKE2b-256 ed91e2f59d2b4be45068b023d21cfe16f1c3cf10c3c35dd778ed68fd848d2c1f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for blurhash_pyside-0.2.3-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 a3d8b54f929fcc9b174595e1c8618544395f2f4f3c986b77f9f7d09f8c08b25b
MD5 747704fa6e727c1d999d6534d7d343a9
BLAKE2b-256 4cb1416f9bdb49da58969a3e2279cbdea8f80a603c3ee047089d696a83ceb858

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for blurhash_pyside-0.2.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6399823ad64d444162d50e10c20dc1401613c3d00bc6410a72d018f4195a082f
MD5 515802a4733a8d2f8b9d72acc1d7b6d6
BLAKE2b-256 1fadb87981b9ae765400ce3dd6d801e5f370bc3e53af30dfe1c83857caea2c0b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for blurhash_pyside-0.2.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 28b06c5022e47db846991e432d050b05afecb17e3afbf59d40631b7f720b4b80
MD5 6fe17a01a94bdee3e2506d8a842a90cb
BLAKE2b-256 d73b7845a2f9819e642660fafb157f4802bc16455ff4650ed1930c87e7cab00d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for blurhash_pyside-0.2.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e9e715ad277c16c0b85fc5d77b1710820b07529f0f338ddbed9588a498dadd6b
MD5 288bf5c58c8d1f5ce65639b186124dee
BLAKE2b-256 39b28d946b69478495e97a0db3079ccb1da31904398448e4e9779f957818d53a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for blurhash_pyside-0.2.3-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 9b94fadeb7216c93df0e0d3ac179be3976ad8df77811484627e9a2f8a4f25844
MD5 6bb5683df9b1778f4843b2c8bf6dd879
BLAKE2b-256 a48cd9988ada3605a6c5bbddf9f09774253e8055b92aa20044923711353c484f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for blurhash_pyside-0.2.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c44e495bac78af2f86f108e7d9d9e49bce8207035bc680000d1ef68c1fd2ce91
MD5 2e9d1b3de345f482c608e7bd04d2c5db
BLAKE2b-256 3eaa1a863df2e4090ffb8846d5036643bb21165464063e3faf50c8f357918ea7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for blurhash_pyside-0.2.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d339753795c2f11b10aeb174e49a92ef672bf5b56c38098362b316ac9ff5302b
MD5 f88247c98fa5b7b0db9f611047bf7fb6
BLAKE2b-256 0bee312cc8ca313a78d0059546c936f6a6d1e0609e30cbdf7e7fed6d559d31e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for blurhash_pyside-0.2.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6fd2d1d932136fd6dbe2869e26b0b360d6f473187b129195bf9e24f9b91d5b14
MD5 435556edac3fd19ba20c3ecce04e2c3d
BLAKE2b-256 9354684939a150aba28d541c23429c0e50b34be0671be49470119f84aa15cdd7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for blurhash_pyside-0.2.3-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 55a21ef3fd1304c21968a1f9beb8a4ee4223bf63c8ab8e750ba1ab4dc098e0a5
MD5 0b5a307f5c1a0109d384e430a63dd709
BLAKE2b-256 029dc546b2353604ffcd85852fc59e035309635568774f06f4e86e31d01ad037

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for blurhash_pyside-0.2.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 54a8cd39d730b6de5193899a4417a6fdc98a70050fa4a97307fa4a625c632c3a
MD5 a622edf4be75eb0f0c35a0c0292e9c9f
BLAKE2b-256 236713029cf602daa1830d6ff7008fe9eb49bacbd807e9286a66d7852a1a47c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for blurhash_pyside-0.2.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ac2f811a0342da9938661c07c6f613c79b7f644dfdac3c14e74dab033088b1a8
MD5 01873dc275ca362fecfc17dc46d9d7e9
BLAKE2b-256 bc371c145ce423323a0935bce9ac37b4d123b86b60570bf7760f928c40c1e55c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for blurhash_pyside-0.2.3-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ac43faf21e73e5fff2350284c1f9a65fa1fdfc2f20364ff91739f77054e07735
MD5 e48965ee392c58dbde8e9934e7627905
BLAKE2b-256 36bd1c15601ff88280cb1301a4ca3946305cb10e4863eda92d103cabe40f220e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for blurhash_pyside-0.2.3-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 8e3d3d1742436d4d5791c65e1515cf447e7e3051c87063c1381e9066a932f443
MD5 98171a18a66abd521dbc5431a8f76c98
BLAKE2b-256 23b2607a2d3c305696d0d637bcd2ad4fa970f731f58a5aced520f7ddc2c6af12

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for blurhash_pyside-0.2.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3e52734aca86ba4b70d8d6c8dffd08798d819afd43783d6a0f204e41772a462c
MD5 abb4a27c5f8649c0dcb5c0b711a7450e
BLAKE2b-256 4f92ecdb26477fb7935f344e19bf0900717baf604ffce6275ede974f65f6e2e2

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