# detectPresentationAttack method

void detectPresentationAttack(

1. Portrait portrait

)

Detects a possible presentation attack. Important: This method requires the `FaceColorBasedPad` models to be loaded.

param portrait The portrait. throws FaceException An error has occurred during Face Library execution.

## Implementation

    void detectPresentationAttack(Portrait portrait) {
      var err = faceSDK.id3FacePortraitProcessor_DetectPresentationAttack(_pHandle.value, portrait.handle);
      if (err != FaceError.success.value) {
        throw FaceException(err);
      }
    }