blurhash-glib
A GLib-based blurhash implementation partially ported from fast-blurhash including further optimizations.
Usage
public static Gdk.Pixbuf? blurhash_to_pixbuf (string blurhash, int width, int height) {
uint8[]? data = Blurhash.decode_to_data (blurhash, width, height);
if (data == null) return null;
return new Gdk.Pixbuf.from_data (
data,
Gdk.Colorspace.RGB,
true,
8,
width,
height,
4 * height
);
}
Building
$ meson setup builddir .
$ meson compile -C builddir
$ meson test -C builddir
$ meson install -C builddir
Contributing
- Read the Code of Conduct
- Fork it ( https://gitlab.gnome.org/GeopJr/blurhash-glib/-/forks/new )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request