encodeBlurHash function

  1. @Deprecated('Use [BlurHash.encode] instead.')
String encodeBlurHash(
  1. Uint8List data,
  2. int width,
  3. int height,
  4. {int numCompX = 4,
  5. int numpCompY = 3}
)

Deprecated. Please use BlurHash.encode instead. Encodes an image to a BlurHash string

Implementation

@Deprecated('Use [BlurHash.encode] instead.')
String encodeBlurHash(
  Uint8List data,
  int width,
  int height, {
  int numCompX = 4,
  int numpCompY = 3,
}) {
  final image = Image.fromBytes(
    width: width,
    height: height,
    bytes: data.buffer,
  );
  final hash = BlurHash.encode(image, numCompX: numCompX, numCompY: numpCompY);
  return hash.hash;
}