calcMetadataImplementation static method
you would likely want to use NativeImplementations and Client.nativeImplementations instead
Implementation
static SDNImageFileResizedResponse? calcMetadataImplementation(
Uint8List bytes) {
final image = decodeImage(bytes);
if (image == null) return null;
return SDNImageFileResizedResponse(
bytes: bytes,
width: image.width,
height: image.height,
blurhash: BlurHash.encode(
image,
numCompX: 4,
numCompY: 3,
).hash,
);
}