Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
Toggle table of contents sidebar

# PortraitProcessor.cropMargin Property

Module: PortraitProcessor

Type: float

## Definition

Relative margin around the face for basic portrait cropping.

Hint

Default value is 0.5.

Python

    crop_margin: float

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Dart

    double get cropMargin => getCropMargin();
    set cropMargin(double value) => setCropMargin(value);

Exceptions

> FaceException
> An error has occurred during Face Library execution.

C#

    public float cropMargin
    {
        get => GetcropMargin();
        set => SetcropMargin(ref value);
    }

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Java

    public float getCropMargin() throws FaceException
    public void setCropMargin(float cropMargin) throws FaceException

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Swift

    public var cropMargin: Float
        get {
            return try! getCropMargin()
        }
    }

Exceptions

> FaceException
> An error has occurred during Face Library execution.

C

    int id3FacePortraitProcessor_GetCropMargin (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, float * cropMargin)
    int id3FacePortraitProcessor_SetCropMargin (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, float cropMargin)

Returns

> `int`
> An error code.
> See id3FaceError file for the list of possible error codes.