Class
CropFacesTransform
public class CropFacesTransform: Transform
Crops selected faces contained inside an image.
Relationships
Superclass
Transform
:nodoc:
Initializers
Methods
mode(_:)
@discardableResult
func mode(_ value: TransformCropMode) -> Self
Adds the mode
option.
Parameters
Name | Type | Description |
---|---|---|
value | TransformCropMode |
An |
width(_:)
@discardableResult
func width(_ value: Int) -> Self
Adds the width
option.
Parameters
Name | Type | Description |
---|---|---|
value | Int |
The crop's width. |
height(_:)
@discardableResult
func height(_ value: Int) -> Self
Adds the height
option.
Parameters
Name | Type | Description |
---|---|---|
value | Int |
The crop's height. |
minSize(_:)
@discardableResult
func minSize(_ value: Float) -> Self
Adds the minSize
option.
Parameters
Name | Type | Description |
---|---|---|
value | Float |
This parameter is used to weed out objects that most likely are not faces. Valid range: |
maxSize(_:)
@discardableResult
func maxSize(_ value: Float) -> Self
Adds the maxSize
option.
Parameters
Name | Type | Description |
---|---|---|
value | Float |
This parameter is used to weed out objects that most likely are not faces. Valid range: |
buffer(_:)
@discardableResult
func buffer(_ value: Int) -> Self
Adds the buffer
option.
Parameters
Name | Type | Description |
---|---|---|
value | Int |
Adjusts the buffer around the face object as a percentage of the original object. Valid range: |
faces(_:)
@discardableResult
func faces(_ value: [Int]) -> Self
Adds the faces
option.
Parameters
Name | Type | Description |
---|---|---|
value | [Int] |
The faces to be included in the crop. |