Filestack Documentation

Class Crop​Faces​Transform

public class CropFacesTransform: Transform  

Crops selected faces contained inside an image.

CropFacesTransform CropFacesTransform Transform Transform CropFacesTransform->Transform

Superclass

Transform

:nodoc:

Initializers

init()

public init()  

Initializes a CropFacesTransform object.

Methods

mode(_:​)

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

Adds the mode option.

Parameters

value Transform​Crop​Mode

An TransformCropMode value.

width(_:​)

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

Adds the width option.

Parameters

value Int

The crop's width.

height(_:​)

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

Adds the height option.

Parameters

value Int

The crop's height.

min​Size(_:​)

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

Adds the minSize option.

Parameters

value Float

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

max​Size(_:​)

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

Adds the maxSize option.

Parameters

value Float

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

all​Faces()

@discardableResult
    func allFaces() -> Self  

Adds the faces option with value all.

buffer(_:​)

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

Adds the buffer option.

Parameters

value Int

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

faces(_:​)

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

Adds the faces option.

Parameters

value [Int]

The faces to be included in the crop.