blurhash 0.2.1 copy "blurhash: ^0.2.1" to clipboard
blurhash: ^0.2.1 copied to clipboard

outdated

A very compact representation of a placeholder for an image.

blurhash #

pub package

Compact representation of a placeholder for an image.

Usage #

To use this plugin, add blurhash as a dependency in your pubspec.yaml file.

Example #

void blurHashEncode() async {
  ByteData bytes = await rootBundle.load("image.jpg");
  Uint8List pixels = bytes.buffer.asUint8List();
  var blurHash = await BlurHash.encode(pixels, 4, 3);
}

void blurHashDecode() async {
  Uint8List imageDataBytes;
  try {
    imageDataBytes = await BlurHash.decode(blurhash, 20, 12);
  } on PlatformException catch (e) {
    print(e.message);
  }
}
75
likes
40
pub points
89%
popularity

Publisher

verified publisherraincal.com

A very compact representation of a placeholder for an image.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on blurhash