.. index:: 
  !DocumentImage.resize Method
  
.. _id3_document_document_image_resize_class_method:

===============================================================================
DocumentImage.resize Method
===============================================================================

Module: :ref:`DocumentImage<id3_document_document_image_class>`

Definition
----------

Resizes the image in-place to the required width and height.


.. tab-set::

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

      .. code:: Python

        resize(self, width: int, height: int) -> None

      **Parameters**

        .. line-block::

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

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


      **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 resize(int width, int height)

      **Parameters**

        .. line-block::

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

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


      **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 Resize(int width, int height)

      **Parameters**

        .. line-block::

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

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


      **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 resize(int width, int height) throws DocumentException

      **Parameters**

        .. line-block::

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

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


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

      **Parameters**

        .. line-block::

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

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


      **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_Resize (
            ID3_DOCUMENT_IMAGE hDocumentImage, 
            int width, 
            int height)

      **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.


      **Returns**

        .. line-block::

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


