imreadAsync function
Implementation
Future<Mat> imreadAsync(String filename, {int flags = IMREAD_COLOR}) async {
final dst = Mat.empty();
final cname = filename.toNativeUtf8().cast<ffi.Char>();
return cvRunAsync0(
(callback) => cimgcodecs.cv_imread(cname, flags, dst.ptr, callback),
(c) {
calloc.free(cname);
return c.complete(dst);
},
);
}