Skip to content

bbrks/go-blurhash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c96d1fe · Nov 9, 2022

History

15 Commits
Nov 9, 2022
May 9, 2019
Nov 9, 2022
May 9, 2019
Jan 2, 2021
Sep 5, 2020
Sep 5, 2020
Jan 2, 2021
May 13, 2019
May 13, 2019
Nov 9, 2022
May 9, 2019
May 9, 2019
May 13, 2019

Repository files navigation

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.