.. index:: 
  !Image.rotate Method
  
.. _id3_face_image_rotate_class_method:

===============================================================================
Image.rotate Method
===============================================================================

Module: :ref:`Image<id3_face_image_class>`

Definition
----------

Rotates the image in-place to the specified angle.

.. note:: The rotation is performed counter-clockwise.


.. tab-set::

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

      .. code:: Python

        rotate(self, angle: int) -> None

      **Parameters**

        .. line-block::

          ``angle`` int
          :guilabel:`in` The rotation angle, in degree. Supported values are [0, 90, 180, 270].


      **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 rotate(int angle)

      **Parameters**

        .. line-block::

          ``angle`` int
          :guilabel:`in` The rotation angle, in degree. Supported values are [0, 90, 180, 270].


      **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 Rotate(int angle)

      **Parameters**

        .. line-block::

          ``angle`` int
          :guilabel:`in` The rotation angle, in degree. Supported values are [0, 90, 180, 270].


      **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 rotate(int angle) throws FaceException

      **Parameters**

        .. line-block::

          ``angle`` int
          :guilabel:`in` The rotation angle, in degree. Supported values are [0, 90, 180, 270].


      **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 rotate(angle: Int32) throws

      **Parameters**

        .. line-block::

          ``angle`` Int32
          :guilabel:`in` The rotation angle, in degree. Supported values are [0, 90, 180, 270].


      **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_Rotate (
            ID3_FACE_IMAGE hImage, 
            int angle)

      **Parameters**

        .. line-block::

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

          ``angle`` int
          :guilabel:`in` The rotation angle, in degree. Supported values are [0, 90, 180, 270].


      **Returns**

        .. line-block::

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


