toFile method

void toFile(
  1. String? path
)

Saves the face object to a file.

param path Path to the file to export the face object to. throws FaceException An error has occurred during Face Library execution.

Implementation

void toFile(String? path) {
  Pointer<Char>? pPath = path?.toNativeUtf8().cast<Char>();
  try {
    var err = faceSDK.id3DetectedFace_ToFile(_pHandle.value, pPath ?? nullptr);
    if (err != FaceError.success.value) {
      throw FaceException(err);
    }
  } finally {
    if (pPath != null) {
      calloc.free(pPath);
    }
  }
}