.. index:: 
  !DocumentImage.flip Method
  
.. _id3_document_document_image_flip_class_method:

===============================================================================
DocumentImage.flip Method
===============================================================================

Module: :ref:`DocumentImage<id3_document_document_image_class>`

Definition
----------

Flips the image in-place.


.. tab-set::

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

      .. code:: Python

        flip(self, flip_horizontally: bool, flip_vertically: bool) -> None

      **Parameters**

        .. line-block::

          ``flip_horizontally`` bool
          :guilabel:`in` Value indicating whether the image should be flipped horizontally.

          ``flip_vertically`` bool
          :guilabel:`in` Value indicating whether the image should be flipped vertically.


      **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 flip(bool flipHorizontally, bool flipVertically)

      **Parameters**

        .. line-block::

          ``flipHorizontally`` bool
          :guilabel:`in` Value indicating whether the image should be flipped horizontally.

          ``flipVertically`` bool
          :guilabel:`in` Value indicating whether the image should be flipped vertically.


      **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 Flip(bool flipHorizontally, bool flipVertically)

      **Parameters**

        .. line-block::

          ``flipHorizontally`` bool
          :guilabel:`in` Value indicating whether the image should be flipped horizontally.

          ``flipVertically`` bool
          :guilabel:`in` Value indicating whether the image should be flipped vertically.


      **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 flip(boolean flipHorizontally, boolean flipVertically) throws DocumentException

      **Parameters**

        .. line-block::

          ``flipHorizontally`` boolean
          :guilabel:`in` Value indicating whether the image should be flipped horizontally.

          ``flipVertically`` boolean
          :guilabel:`in` Value indicating whether the image should be flipped vertically.


      **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 flip(flipHorizontally: Bool, flipVertically: Bool) throws

      **Parameters**

        .. line-block::

          ``flipHorizontally`` Bool
          :guilabel:`in` Value indicating whether the image should be flipped horizontally.

          ``flipVertically`` Bool
          :guilabel:`in` Value indicating whether the image should be flipped vertically.


      **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_Flip (
            ID3_DOCUMENT_IMAGE hDocumentImage, 
            bool flipHorizontally, 
            bool flipVertically)

      **Parameters**

        .. line-block::

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

          ``flipHorizontally`` bool
          :guilabel:`in` Value indicating whether the image should be flipped horizontally.

          ``flipVertically`` bool
          :guilabel:`in` Value indicating whether the image should be flipped vertically.


      **Returns**

        .. line-block::

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


