blurhash-update
A blurhash encoder for streaming bytes
Supports
- Encoding
- Decoding
Motivation
There exists already a blurhash crate, which is a good choice for creating blurhashes, however, it requires that all pixels for a given image exist in memory in order to compute it. For very large images, this might not be ideal.
blurhash-update provides an API for processing bytes from an image as they are made available. This isn't as performant as blurhash in like-for-like comparisons, but the benefit of a lower memory overhead can be useful in some scenarios.
blurhash-update also provides the ability to reduce accuracy by skipping processing of some of the
input pixels. This greatly improves performance, but might lead to blurhashes that don't look quite
right. Using blurhash-update's auto
encoder configuration will target an extremely performant but
very loose profile based on the image dimensions.
Usage
use Read;
use ;
use Parser;
Example usage:
| \
License
blurhash-update is licensed under either of the following:
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)