encode method

  1. @override
Future<String> encode(
  1. Uint8List image,
  2. int componentX,
  3. int componentY
)
override

Implementation

@override
Future<String> encode(Uint8List image, int componentX, int componentY) async {
  final imageData = img.decodeImage(image);
  BlurHash blurhash =
      BlurHash.encode(imageData!, numCompX: componentX, numCompY: componentY);
  return blurhash.hash;
}