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

# DetectedFace.fromFile Method

Module: DetectedFace

## Definition

Imports the face object from a file.

Python

    @staticmethod
    from_file(path: str) -> DetectedFace

Parameters

> `path` str
> in Path to the file to import the face object from.

Returns

> DetectedFace
> The newly created detected face.

Exceptions

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

Dart

    static DetectedFace fromFile(String? path)

Parameters

> `path` String
> in Path to the file to import the face object from.

Returns

> DetectedFace
> The newly created detected face.

Exceptions

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

C#

    public static DetectedFace FromFile(string path)

Parameters

> `path` string
> in Path to the file to import the face object from.

Returns

> DetectedFace
> The newly created detected face.

Exceptions

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

Java

    public static DetectedFace fromFile(String path) throws FaceException

Parameters

> `path` String
> in Path to the file to import the face object from.

Returns

> DetectedFace
> The newly created detected face.

Exceptions

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

Swift

    public static func fromFile(path: String) throws -> DetectedFace

Parameters

> `path` String
> in Path to the file to import the face object from.

Returns

> DetectedFace
> The newly created detected face.

Exceptions

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

C

    int id3DetectedFace_FromFile (
        ID3_DETECTED_FACE hDetectedFace,
        const char * path)

Parameters

> `hDetectedFace` ID3_DETECTED_FACE
> in Handle to the DetectedFace object.
> `path` const char *
> in Path to the file to import the face object from.

Returns

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