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

# PortraitProcessor.cropIcaoPortrait Method

Module: PortraitProcessor

## Definition

Creates an ICAO-compliant portrait image by cropping the source image around the detected face.

This method uses the following parameters:

- Portrait aspect ratio

- Portrait eye position ratio

- Portrait IOD ratio

Python

    crop_icao_portrait(self, portrait: Portrait) -> Image

Parameters

> `portrait` Portrait
> in Source portrait.

Returns

> Image
> The output cropped image.

Exceptions

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

Dart

    Image cropIcaoPortrait(Portrait portrait)

Parameters

> `portrait` Portrait
> in Source portrait.

Returns

> Image
> The output cropped image.

Exceptions

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

C#

    public Image CropIcaoPortrait(Portrait portrait)

Parameters

> `portrait` Portrait
> in Source portrait.

Returns

> Image
> The output cropped image.

Exceptions

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

Java

    public Image cropIcaoPortrait(Portrait portrait) throws FaceException

Parameters

> `portrait` Portrait
> in Source portrait.

Returns

> Image
> The output cropped image.

Exceptions

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

Swift

    public func cropIcaoPortrait(portrait: Portrait) throws -> Image

Parameters

> `portrait` Portrait
> in Source portrait.

Returns

> Image
> The output cropped image.

Exceptions

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

C

    int id3FacePortraitProcessor_CropIcaoPortrait (
        ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor,
        ID3_FACE_PORTRAIT hPortrait,
        ID3_FACE_IMAGE hImage)

Parameters

> `hPortraitProcessor` ID3_FACE_PORTRAIT_PROCESSOR
> in Handle to the PortraitProcessor object.
> `hPortrait` ID3_FACE_PORTRAIT
> in Source portrait.
> `hImage` ID3_FACE_IMAGE
> out The output cropped image.

Returns

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