convertToImage method
Image?
convertToImage(
- CameraImage image
Implementation
imglib.Image? convertToImage(CameraImage image) {
try {
imglib.Image? img;
if (image.format.group == ImageFormatGroup.yuv420) {
img = _convertYUV420(image);
} else if (image.format.group == ImageFormatGroup.bgra8888) {
img = _convertBGRA8888(image);
}
return img;
} catch (e) {
print(e);
}
return null;
}