Desktop client for Matrix using Qt and C++20.
Find a file
Nicolas Werner 1e2d273c93 Add readme
2020-03-01 14:00:59 +01:00
subprojects Initial decoder 2020-03-01 01:59:56 +01:00
.clang-format Initial decoder 2020-03-01 01:59:56 +01:00
.gitignore Initial decoder 2020-03-01 01:59:56 +01:00
.gitmodules Initial decoder 2020-03-01 01:59:56 +01:00
blurhash.cpp Add encoding 2020-03-01 13:42:22 +01:00
blurhash.hpp Add encoding 2020-03-01 13:42:22 +01:00
blurhash2bmp.cpp Add encoding 2020-03-01 13:42:22 +01:00
image2blurhash.cpp Add encoding 2020-03-01 13:42:22 +01:00
LICENSE Add encoding 2020-03-01 13:42:22 +01:00
meson.build Add encoding 2020-03-01 13:42:22 +01:00
README.md Add readme 2020-03-01 14:00:59 +01:00
stb_image.h Add encoding 2020-03-01 13:42:22 +01:00
stb_image_write.h Initial decoder 2020-03-01 01:59:56 +01:00

Blurhash encoder/decoder for C++

Simple encoder and decoder for blurhashes. In large parts inspired by the reference implementation.

Build Requirements

  • A C++17 compiler, specifically with support for parsing integers via std::from_chars and some other smaller features.
  • The meson build system, if you don't want to embed the library into your project.

Usage as a library

Just add blurhash.h and blurhash.cpp to your project. Use blurhash::encode for encoding and blurhash::decode for decoding.

Usage from the command line

After building, run blurhash for creating a hash and blurhash2bmp for decoding a hash. You need to specify the intended components for encoding and the intended dimensions and file name for decoding.

Attributions

Projects that made this project possible:

  • The blurhash project for creating and documenting the algorithm and reference implementations.
  • The stb project for creating the image encoder and decoder used in the command line tools.
  • Doctest for providing the easy to use testing framework.