Face Crop
Crop operation focusing only on one face
Last updated
Crop operation focusing only on one face
Last updated
©2024 Scaleflex SAS
Finds the most prominent face in the image and crops it to specified dimension provided with the width and height parameters. If you however provide only one dimension, the other dimension will be chosen automatically to keep the aspect ratio of the face.
func=face
If there is no face in the image or many faces are found, the operation defaults to a standard crop.
Preview | Syntax |
---|---|
Sets margins around the face. You can set equal margins with face_margin=X or separate horizontal and vertical margins (face_margin=W,H).
face_margin=X|W,H
Preview | Syntax |
---|---|
Standard crop: /docs/business-portfolio.jpg?w=400&h=300
Face crop: /docs/classroom.jpg?h=240&w=380&func=face
Face crop with automatic aspect ratio: /docs/classroom.jpg?h=240&func=face