imagenie.flip
=============

.. py:module:: imagenie.flip


Functions
---------

.. autoapisummary::

   imagenie.flip.flip


Module Contents
---------------

.. py:function:: flip(image, direction=0)

   Flips an image either horizontally or vertically.

   Parameters:
   ----------
   image : np.ndarray
       The input image to be flipped, represented as a NumPy array or similar format.
   direction : str, optional
       The direction in which to flip the image:
       - 0: for horizontal flip (default)
       - 1: vertical flip

   Returns:
   -------
   np.ndarray
       The flipped image as a NumPy array.

   Raises:
   ------
   ValueError
       If the specified direction is not 1 or 0.
       If image exceeds size limits.


   Examples:
   ---------
   Flip an image horizontally:
   >>> flipped_image = flip_image(image)

   Flip an image vertically:
   >>> flipped_image = flip_image(image, 1)


