getCapturedImage method
Implementation
Uint8List getCapturedImage(Pointer<Void> libraryPtr, Pointer<Void> workflowPtr) {
Pointer<Pointer<Uint8>> captureImageOut = calloc();
Pointer<Int> sizeOut = calloc();
int error = _getCapturedImage(libraryPtr, workflowPtr, captureImageOut, sizeOut);
if( error != FaceCaptureErrorCode.noErrors.value ) {
throw FaceCaptureException(error);
}
Pointer<Uint8> frame = captureImageOut.value;
Uint8List frameData = frame.asTypedList(sizeOut.value);
calloc.free(frame);
calloc.free(sizeOut);
calloc.free(captureImageOut);
return frameData;
}