convertCameraImage static method

Future<Image?> convertCameraImage(
  1. CameraImage cameraImage
)

Converts a CameraImage in YUV420 format to Image in RGB format

Implementation

static Future<Image?> convertCameraImage(CameraImage cameraImage) async {
  Uint8List? bytes = (await convertCameraImageToBytes(cameraImage));
  if (bytes != null) {
    return decodeJpg(bytes);
  } else {
    return null;
  }
}