.. index:: 
  !FaceTemplate Class

.. _id3_face_face_template_class:

===============================================================================
FaceTemplate Class
===============================================================================

Namespace: :ref:`id3.Face<reference_face>`

.. toctree::
  :hidden:

  clone<clone>
  format<format>
  fromBuffer<from_buffer>
  fromFile<from_file>
  quality<quality>
  toBdt<to_bdt>
  toBit<to_bit>
  toBuffer<to_buffer>
  toFile<to_file>
  update<update>


Definition
----------
.. line-block::
    Represents a face template.

.. tab-set::

    .. tab-item:: Python
      :sync: Python

      .. code:: Python

        class FaceTemplate

    .. tab-item:: Dart
      :sync: Dart

      .. code:: Dart

        class FaceTemplate implements Finalizable

    .. tab-item:: C#
      :sync: C#

      .. code:: C#

        public partial class FaceTemplate

    .. tab-item:: Java
      :sync: Java

      .. code:: Java

        public class FaceTemplate implements AutoCloseable, Serializable

    .. tab-item:: Swift
      :sync: Swift

      .. code:: Swift

        public class FaceTemplate

    .. tab-item:: C
      :sync: C

      .. code:: C

        typedef struct id3FaceTemplate *ID3_FACE_TEMPLATE;



Usage
-----

.. tab-set::

    .. tab-item:: Python
      :sync: Python

      .. code:: Python

        faceTemplateInstance = id3face.FaceTemplate()

      **Explicit destruction**

      .. code:: Python

        # ...
        del faceTemplateInstance

    .. tab-item:: Dart
      :sync: Dart

      .. code:: Dart

        final faceTemplateInstance = sdk.FaceTemplate();
        // ...

      **Explicit destruction**

      .. code:: Dart

        // ...
        faceTemplateInstance.dispose()

    .. tab-item:: C#
      :sync: C#

      .. code:: C#

        using (var faceTemplateInstance = new FaceTemplate())
        {
           // ...
        }

      **Explicit destruction**

      .. code:: C#

        var faceTemplateInstance = new FaceTemplate()
        // ...
        faceTemplateInstance.Dispose()

    .. tab-item:: Java
      :sync: Java

      .. code:: Java

        try (FaceTemplate faceTemplateInstance = new FaceTemplate()) {
        // ...
        }

      **Explicit destruction**

      .. code:: Java

        FaceTemplate faceTemplateInstance = new FaceTemplate();
        // ...
        faceTemplateInstance.close();

    .. tab-item:: Swift
      :sync: Swift

      .. code:: Swift

        private var faceTemplateInstance: FaceTemplate? = nil
        faceTemplateInstance = try FaceTemplate()

    .. tab-item:: C
      :sync: C

      .. code:: C

        ID3_FACE_TEMPLATE hFaceTemplate{};
        int err = id3FaceTemplate_Initialize(&hFaceTemplate);
        if (err == ID3_SUCCESS) {
            // ...
            id3FaceTemplate_Dispose(&hFaceTemplate);
        }


Properties
----------

.. list-table:: 
  :width: 100%
  :widths: 30 5 65
  :header-rows: 1

  * - Name
    - Type
    - Description
  * - :ref:`format<id3_face_face_template_format_class_member>`
    - :ref:`FaceTemplateFormat<id3_face_face_template_format_enum>`
    - Format of the face template.
  * - :ref:`quality<id3_face_face_template_quality_class_member>`
    - int
    - Quality of the face template.

Static Methods
--------------

.. list-table:: 
  :width: 100%
  :widths: 30 70
  :header-rows: 1

  * - Name
    - Description
  * - :ref:`fromBuffer<id3_face_face_template_from_buffer_class_method>`
    - Imports the face template object from a buffer.
  * - :ref:`fromFile<id3_face_face_template_from_file_class_method>`
    - Imports the face template object from a file.

Methods
-------

.. list-table:: 
  :width: 100%
  :widths: 30 70
  :header-rows: 1

  * - Name
    - Description
  * - :ref:`clone<id3_face_face_template_clone_class_method>`
    - Clones the FaceTemplate object.
  * - :ref:`toBdt<id3_face_face_template_to_bdt_class_method>`
    - Exports the face template object to a Biometric Data Template (BDT) buffer.
  * - :ref:`toBit<id3_face_face_template_to_bit_class_method>`
    - Exports the face template as a Biometric Information Template (BIT) for enrolment on a smart card equipped with id3 Match-on-Card technology.
  * - :ref:`toBuffer<id3_face_face_template_to_buffer_class_method>`
    - Exports the face template object to a buffer.
  * - :ref:`toFile<id3_face_face_template_to_file_class_method>`
    - Exports the face template object to a file.
  * - :ref:`update<id3_face_face_template_update_class_method>`
    - Updates the face template by combining it with the specified face template.
