convertNV21ToImage static method

Image convertNV21ToImage(
  1. CameraImage image
)

Implementation

static Image convertNV21ToImage(CameraImage image) {
  return Image.fromBytes(
    width: image.width,
    height: image.height,
    bytes: image.planes.first.bytes.buffer,
    order: ChannelOrder.bgra,
  );
}