getCropMargin method

double getCropMargin()

Gets the relative margin around the face for basic portrait cropping. Hint: Default value is 0.5.

return Relative margin around the face for basic portrait cropping. throws FaceException An error has occurred during Face Library execution.

Implementation

double getCropMargin() {
  Pointer<Float> pCropMargin = calloc();
  try {
    var err = faceSDK.id3FacePortraitProcessor_GetCropMargin(_pHandle.value, pCropMargin);
    if (err != FaceError.success.value) {
      throw FaceException(err);
    }
    final vCropMargin = pCropMargin.value;
    return vCropMargin;
  } finally {
    calloc.free(pCropMargin);
  }
}