convertCameraImageToBytes static method
Converts a CameraImage
in YUV420 format to Image
in RGB format
Implementation
static Future<Uint8List?> convertCameraImageToBytes(CameraImage cameraImage,
{int? rotation}) async {
await ImageUtilsIsolate.init();
return (await ImageUtilsIsolate.computer.compute(_convertCameraImageToBytes,
param: _getParamsBasedOnType(cameraImage, rotation: rotation))
as TransferableTypedData?)
?.materialize()
.asUint8List();
}