Image.cropCenter Method

Module: Image

Definition

Crops the image at its center with the specified aspect ratio.

The function computes the largest crop that fits within the input image while maintaining

the target aspect ratio. The crop is centered in the original image.

Image cropCenter(double aspectRatio)

Parameters

aspectRatio double
in Target aspect ratio (width/height) for the cropped image. Must be positive.

Returns

The cropped image with the specified aspect ratio.

Exceptions

An error has occurred during Face Library execution.