GeopJr / blurhash-glib

[MIRROR] A GLib-based blurhash implementation partially ported from fast-blurhash including further optimizations.

Home Page:https://gitlab.gnome.org/GeopJr/blurhash-glib

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

  1. Read the Code of Conduct
  2. Fork it ( https://gitlab.gnome.org/GeopJr/blurhash-glib/-/forks/new )
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request

About

[MIRROR] A GLib-based blurhash implementation partially ported from fast-blurhash including further optimizations.

https://gitlab.gnome.org/GeopJr/blurhash-glib

License:BSD 2-Clause "Simplified" License


Languages

Language:Vala 87.2%Language:Meson 11.4%Language:Makefile 1.4%