encode method
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;
}