.. index:: 
  !Portrait.clone Method
  
.. _id3_face_portrait_clone_class_method:

===============================================================================
Portrait.clone Method
===============================================================================

Module: :ref:`Portrait<id3_face_portrait_class>`

Definition
----------

Clones the Portrait object.


.. tab-set::

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

      .. code:: Python

        clone(self) -> Portrait

      **Returns**

        .. line-block::

          :ref:`Portrait<id3_face_portrait_class>`
          The newly created portrait.

      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


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

      .. code:: Dart

        Portrait clone()

      **Returns**

        .. line-block::

          :ref:`Portrait<id3_face_portrait_class>`
          The newly created portrait.

      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


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

      .. code:: C#

        public Portrait Clone()

      **Returns**

        .. line-block::

          :ref:`Portrait<id3_face_portrait_class>`
          The newly created portrait.

      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


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

      .. code:: Java

        public Portrait clone() throws FaceException

      **Returns**

        .. line-block::

          :ref:`Portrait<id3_face_portrait_class>`
          The newly created portrait.

      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


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

      .. code:: Swift

        public func clone() throws -> Portrait

      **Returns**

        .. line-block::

          :ref:`Portrait<id3_face_portrait_class>`
          The newly created portrait.

      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


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

      .. code:: C

        int id3FacePortrait_CopyTo (
            ID3_FACE_PORTRAIT hPortrait, 
            ID3_FACE_PORTRAIT hPortraitDst)

      **Parameters**

        .. line-block::

          ``hPortrait`` :ref:`ID3_FACE_PORTRAIT<id3_face_portrait_class>`
          :guilabel:`in` Handle to the Portrait object.

          ``hPortraitDst`` :ref:`ID3_FACE_PORTRAIT<id3_face_portrait_class>`
          :guilabel:`out` The newly created portrait.


      **Returns**

        .. line-block::

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


