Thumbhash - Pure Elixir implementation of ThumbHash

ThumbHash is a library that encodes images into specific hashes, the base64 encoded hash data is usually only about 20 - 30 strings long. It is used to display placeholder images (or thumbnails).

ThumbHash can be stored in a database because it can be encoded as a short string. I think this is a huge advantage. And ThumbHash is rendered as a highly blurred image after restore, instead of a low quality feel.

For details, please refer to the official page: ThumbHash: A very compact representation of an image placeholder

I implemented it in Elixir, here is the repository:

14 Likes

Cool! I currently use the Rust NIF version, which includes ThumbHash-to-placeholder image conversion as well.

That version requires Image and does some of the image processing for you. Maybe the code there could help you with your example code.