# getPortraitBounds method

Rectangle getPortraitBounds(

1. double eyeImageWidthRatio,
2. double eyeImageHeightRatio,
3. double imageRatio

)

Gets the bounding box of the detected face for ICAO portrait cropping. This method shall be used to ensure compliance with the ICAO standard.

param eyeImageWidthRatio Ratio between eye distance and image width. Must be in the range )0;1(. Default recommended value is 0.25. param eyeImageHeightRatio Ratio between eye distance to top and image height. Must be in the range )0;1(. Default recommended value is 0.45. param imageRatio Ratio between image height and image width. Default recommended value is 1.33 (4/3). return The portrait bounds of the detected face. throws FaceException An error has occurred during Face Library execution.

## Implementation

    Rectangle getPortraitBounds(double eyeImageWidthRatio, double eyeImageHeightRatio, double imageRatio) {
      Pointer<id3FaceRectangle> pPortraitBounds = calloc();
      var err = faceSDK.id3TrackedFace_GetPortraitBounds(_pHandle.value, eyeImageWidthRatio, eyeImageHeightRatio, imageRatio, pPortraitBounds);
      if (err != FaceError.success.value) {
      	calloc.free(pPortraitBounds);
      	throw FaceException(err);
      }
      return Rectangle(pPortraitBounds);
    }