Skip to content

Latest commit

 

History

History
17 lines (9 loc) · 1.74 KB

README.md

File metadata and controls

17 lines (9 loc) · 1.74 KB

go-blurhash Go Reference GitHub tag license Go Report Card codecov

A pure Go implementation of Blurhash. The API is stable, however the hashing function in either direction may not be.

Blurhash Demo

Blurhash is an algorithm written by Dag Ågren for Wolt (woltapp/blurhash) that encodes an image into a short (~20-30 byte) ASCII string. When you decode the string back into an image, you get a gradient of colors that represent the original image. This can be useful for scenarios where you want an image placeholder before loading, or even to censor the contents of an image a la Mastodon.

Under the covers, this library is almost a straight port of the C version, which is known to encode images slightly differently than the TypeScript implementation.

Contributing

Issues, feature requests or improvements welcome!

Licence

This project is licensed under the MIT License.