.. index:: 
  !Image.resizeTo Method
  
.. _id3_face_image_resize_to_class_method:

===============================================================================
Image.resizeTo Method
===============================================================================

Module: :ref:`Image<id3_face_image_class>`

Definition
----------

Resizes the image to the specified width and height.


.. tab-set::

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

      .. code:: Python

        resize_to(self, width: int, height: int, dst_image: Image) -> None

      **Parameters**

        .. line-block::

          ``width`` int
          :guilabel:`in` The new width, in pixels.

          ``height`` int
          :guilabel:`in` The new height, in pixels.

          ``dst_image`` :ref:`Image<id3_face_image_class>`
          :guilabel:`in` The destination image that receives the resized image.


      **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 resizeTo(int width, int height, Image dstImage)

      **Parameters**

        .. line-block::

          ``width`` int
          :guilabel:`in` The new width, in pixels.

          ``height`` int
          :guilabel:`in` The new height, in pixels.

          ``dstImage`` :ref:`Image<id3_face_image_class>`
          :guilabel:`in` The destination image that receives the resized image.


      **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 ResizeTo(int width, int height, Image dstImage)

      **Parameters**

        .. line-block::

          ``width`` int
          :guilabel:`in` The new width, in pixels.

          ``height`` int
          :guilabel:`in` The new height, in pixels.

          ``dstImage`` :ref:`Image<id3_face_image_class>`
          :guilabel:`in` The destination image that receives the resized image.


      **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 resizeTo(int width, int height, Image dstImage) throws FaceException

      **Parameters**

        .. line-block::

          ``width`` int
          :guilabel:`in` The new width, in pixels.

          ``height`` int
          :guilabel:`in` The new height, in pixels.

          ``dstImage`` :ref:`Image<id3_face_image_class>`
          :guilabel:`in` The destination image that receives the resized image.


      **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 resizeTo(width: Int32, height: Int32, dstImage: Image) throws

      **Parameters**

        .. line-block::

          ``width`` Int32
          :guilabel:`in` The new width, in pixels.

          ``height`` Int32
          :guilabel:`in` The new height, in pixels.

          ``dstImage`` :ref:`Image<id3_face_image_class>`
          :guilabel:`in` The destination image that receives the resized image.


      **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 id3FaceImage_ResizeTo (
            ID3_FACE_IMAGE hImage, 
            int width, 
            int height, 
            ID3_FACE_IMAGE hDstImage)

      **Parameters**

        .. line-block::

          ``hImage`` :ref:`ID3_FACE_IMAGE<id3_face_image_class>`
          :guilabel:`in` Handle to the Image object.

          ``width`` int
          :guilabel:`in` The new width, in pixels.

          ``height`` int
          :guilabel:`in` The new height, in pixels.

          ``hDstImage`` :ref:`ID3_FACE_IMAGE<id3_face_image_class>`
          :guilabel:`in` The destination image that receives the resized image.


      **Returns**

        .. line-block::

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


