crop method

Image crop(
  1. int left,
  2. int top,
  3. int width,
  4. int height
)

Crop a rectangular region of interest in the image according to the given bounds.

param left Left bound of the crop to extract. param top Top bound of the crop to extract. param width Width of the crop to extract. param height Height of the crop to extract. return The extracted region of interest. throws FaceException An error has occurred during Face Library execution.

Implementation

Image crop(int left, int top, int width, int height) {
  Image imageCrop = Image();
  var err = faceSDK.id3FaceImage_Crop(_pHandle.value, left, top, width, height, imageCrop.handle);
  if (err != FaceError.success.value) {
    imageCrop.dispose();
    throw FaceException(err);
  }
  return imageCrop;
}