CropFacesTransform

public class CropFacesTransform : Transform

Crops selected faces contained inside an image.

Lifecycle

  • Initializes a CropFacesTransform object.

    Declaration

    Swift

    public init()

Public Functions

  • Adds the mode option.

    Declaration

    Swift

    @discardableResult
    func mode(_ value: TransformCropMode) -> Self

    Parameters

    value

    An TransformCropMode value.

  • Adds the width option.

    Declaration

    Swift

    @discardableResult
    func width(_ value: Int) -> Self

    Parameters

    value

    The crop’s width.

  • Adds the height option.

    Declaration

    Swift

    @discardableResult
    func height(_ value: Int) -> Self

    Parameters

    value

    The crop’s height.

  • Adds the minSize option.

    Declaration

    Swift

    @discardableResult
    func minSize(_ value: Float) -> Self

    Parameters

    value

    This parameter is used to weed out objects that most likely are not faces. Valid range: 0.01...10000

  • Adds the maxSize option.

    Declaration

    Swift

    @discardableResult
    func maxSize(_ value: Float) -> Self

    Parameters

    value

    This parameter is used to weed out objects that most likely are not faces. Valid range: 0.01...10000

  • Adds the faces option with value all.

    Declaration

    Swift

    @discardableResult
    func allFaces() -> Self
  • Adds the buffer option.

    Declaration

    Swift

    @discardableResult
    func buffer(_ value: Int) -> Self

    Parameters

    value

    Adjusts the buffer around the face object as a percentage of the original object. Valid range: 0...1000

  • Adds the faces option.

    Declaration

    Swift

    @discardableResult
    func faces(_ value: [Int]) -> Self

    Parameters

    value

    The faces to be included in the crop.