convertCameraImage static method
Image?
convertCameraImage(
- CameraImage cameraImage
Converts a CameraImage
in YUV420 format to Image
in RGB format
Implementation
static Image? convertCameraImage(CameraImage cameraImage) {
if (cameraImage.format.group == ImageFormatGroup.yuv420) {
return convertYUV420ToImage(cameraImage);
} else if (cameraImage.format.group == ImageFormatGroup.bgra8888) {
return convertBGRA8888ToImage(cameraImage);
} else {
return null;
}
}