imdecodeAsync function

Future<Mat> imdecodeAsync(
  1. Uint8List buf,
  2. int flags, {
  3. Mat? dst,
})

Implementation

Future<Mat> imdecodeAsync(Uint8List buf, int flags, {Mat? dst}) async {
  final vec = VecUChar.fromList(buf);
  dst ??= Mat.empty();
  return cvRunAsync0(
    (callback) => cimgcodecs.cv_imdecode(vec.ref, flags, dst!.ptr, callback),
    (c) {
      return c.complete(dst);
    },
  );
}