.. index:: 
  !DocumentImage.resizeTo Method
  
.. _id3_document_document_image_resize_to_class_method:

===============================================================================
DocumentImage.resizeTo Method
===============================================================================

Module: :ref:`DocumentImage<id3_document_document_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_document_image: DocumentImage) -> None

      **Parameters**

        .. line-block::

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

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

          ``dst_document_image`` :ref:`DocumentImage<id3_document_document_image_class>`
          :guilabel:`in` The destination image that receives the resized image.


      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


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

      .. code:: Dart

        void resizeTo(int width, int height, DocumentImage dstDocumentImage)

      **Parameters**

        .. line-block::

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

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

          ``dstDocumentImage`` :ref:`DocumentImage<id3_document_document_image_class>`
          :guilabel:`in` The destination image that receives the resized image.


      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


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

      .. code:: C#

        public void ResizeTo(int width, int height, DocumentImage dstDocumentImage)

      **Parameters**

        .. line-block::

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

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

          ``dstDocumentImage`` :ref:`DocumentImage<id3_document_document_image_class>`
          :guilabel:`in` The destination image that receives the resized image.


      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


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

      .. code:: Java

        public void resizeTo(int width, int height, DocumentImage dstDocumentImage) throws DocumentException

      **Parameters**

        .. line-block::

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

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

          ``dstDocumentImage`` :ref:`DocumentImage<id3_document_document_image_class>`
          :guilabel:`in` The destination image that receives the resized image.


      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


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

      .. code:: Swift

        public func resizeTo(width: Int32, height: Int32, dstDocumentImage: DocumentImage) throws

      **Parameters**

        .. line-block::

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

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

          ``dstDocumentImage`` :ref:`DocumentImage<id3_document_document_image_class>`
          :guilabel:`in` The destination image that receives the resized image.


      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


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

      .. code:: C

        int id3DocumentImage_ResizeTo (
            ID3_DOCUMENT_IMAGE hDocumentImage, 
            int width, 
            int height, 
            ID3_DOCUMENT_IMAGE hDstDocumentImage)

      **Parameters**

        .. line-block::

          ``hDocumentImage`` :ref:`ID3_DOCUMENT_IMAGE<id3_document_document_image_class>`
          :guilabel:`in` Handle to the DocumentImage object.

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

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

          ``hDstDocumentImage`` :ref:`ID3_DOCUMENT_IMAGE<id3_document_document_image_class>`
          :guilabel:`in` The destination image that receives the resized image.


      **Returns**

        .. line-block::

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


