convertBGRA8888toImageColor function

Image convertBGRA8888toImageColor(
  1. CameraImage image
)

Converts CameraImage in BGRA8888 format to BGR Image.

Implementation

imglib.Image convertBGRA8888toImageColor(CameraImage image) {
  var data = NativeDataStruct();

  convertBGRA8888(image.planes, data);
  imglib.Image img1 = imglib.Image.fromBytes(width: image.width, height: image.height, bytes: data.bytes!.buffer, order: imglib.ChannelOrder.bgr);

  return img1;
}