.. index:: 
  !DetectedFace.rescale Method
  
.. _id3_face_detected_face_rescale_class_method:

===============================================================================
DetectedFace.rescale Method
===============================================================================

Module: :ref:`DetectedFace<id3_face_detected_face_class>`

Definition
----------

Rescales the detected face object bounding box and landmarks. This function can be useful if the image was downscaled to speed up detection, then you need to upscale the detected face to fit the source image size.


.. tab-set::

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

      .. code:: Python

        rescale(self, scale: float) -> None

      **Parameters**

        .. line-block::

          ``scale`` float
          :guilabel:`in` The multiplicative rescaling factor to apply to the face object.


      **Exceptions**

        .. line-block::

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


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

      .. code:: Dart

        void rescale(double scale)

      **Parameters**

        .. line-block::

          ``scale`` double
          :guilabel:`in` The multiplicative rescaling factor to apply to the face object.


      **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 void Rescale(float scale)

      **Parameters**

        .. line-block::

          ``scale`` float
          :guilabel:`in` The multiplicative rescaling factor to apply to the face object.


      **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 void rescale(float scale) throws FaceException

      **Parameters**

        .. line-block::

          ``scale`` float
          :guilabel:`in` The multiplicative rescaling factor to apply to the face object.


      **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 rescale(scale: Float) throws

      **Parameters**

        .. line-block::

          ``scale`` Float
          :guilabel:`in` The multiplicative rescaling factor to apply to the face object.


      **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 id3DetectedFace_Rescale (
            ID3_DETECTED_FACE hDetectedFace, 
            float scale)

      **Parameters**

        .. line-block::

          ``hDetectedFace`` :ref:`ID3_DETECTED_FACE<id3_face_detected_face_class>`
          :guilabel:`in` Handle to the DetectedFace object.

          ``scale`` float
          :guilabel:`in` The multiplicative rescaling factor to apply to the face object.


      **Returns**

        .. line-block::

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


