CropMode
pub enum CropMode { Safe = 1, Smart = 2,}Controls cropping behaviour.
Variants
= 1
Avoid invalid parameter errors and return an image.
By default, if the specified cropped region is outside the bounds of the image, then the transformation will fail with the error "Invalid transformation for requested image: Invalid crop, region out of bounds". This option will instead deliver the image as an intersection of the origin image and the specified cropped region. This avoids the error, but the resulting image may not be of the specified dimensions.
= 2
Enable content-aware algorithms to attempt to crop the image to the desired aspect ratio while intelligently focusing on the most important visual content, including the detection of faces.