# getExpandedBounds method

Rectangle getExpandedBounds(

1. double aspectRatio,
2. double margin

)

Gets the bounding box around the detected face with specified aspect ratio and specified margin.

param aspectRatio Aspect ratio of the bounding box. Default recommended value is 1.33 (4/3). param margin Relative margin around the detected face. Recommended value is 0.5. return The portrait bounds. throws FaceException An error has occurred during Face Library execution.

## Implementation

    Rectangle getExpandedBounds(double aspectRatio, double margin) {
      Pointer<id3FaceRectangle> pPortraitBounds = calloc();
      var err = faceSDK.id3TrackedFace_GetExpandedBounds(_pHandle.value, aspectRatio, margin, pPortraitBounds);
      if (err != FaceError.success.value) {
      	calloc.free(pPortraitBounds);
      	throw FaceException(err);
      }
      return Rectangle(pPortraitBounds);
    }