o
    \"<f  ã                   @   s¾   d dl mZ dd„ Zdd„ Zdd„ Zdd	„ Zd
d„ Zdd„ Zdd„ Zdd„ Z	dd„ Z
dd„ Zdd„ Zd/dd„Zd/dd„Zdd„ Zd d!„ Zd"d#„ Zd$d%„ Zd&d'„ Zd(d)„ Zd*d+„ Zd0d-d.„Zd,S )1é   )ÚImagec                 C   s   t  d| j|¡S )zVFill a channel with a given grey level.

    :rtype: :py:class:`~PIL.Image.Image`
    ÚL)r   ÚnewÚsize)ÚimageÚvalue© r   úE/var/www/html/kck/venv/lib/python3.10/site-packages/PIL/ImageChops.pyÚconstant   s   r
   c                 C   s   |   ¡ S )ziCopy a channel. Alias for :py:meth:`PIL.Image.Image.copy`.

    :rtype: :py:class:`~PIL.Image.Image`
    )Úcopy©r   r   r   r	   Ú	duplicate   s   r   c                 C   s   |   ¡  |  | j ¡ ¡S )z…
    Invert an image (channel).

    .. code-block:: python

        out = MAX - image

    :rtype: :py:class:`~PIL.Image.Image`
    )ÚloadÚ_newÚimÚchop_invertr   r   r   r	   Úinvert'   s   r   c                 C   ó$   |   ¡  |  ¡  |  | j |j¡¡S )zÖ
    Compares the two images, pixel by pixel, and returns a new image containing
    the lighter values.

    .. code-block:: python

        out = max(image1, image2)

    :rtype: :py:class:`~PIL.Image.Image`
    )r   r   r   Úchop_lighter©Úimage1Úimage2r   r   r	   Úlighter6   ó   r   c                 C   r   )zÕ
    Compares the two images, pixel by pixel, and returns a new image containing
    the darker values.

    .. code-block:: python

        out = min(image1, image2)

    :rtype: :py:class:`~PIL.Image.Image`
    )r   r   r   Úchop_darkerr   r   r   r	   ÚdarkerG   r   r   c                 C   r   )zË
    Returns the absolute value of the pixel-by-pixel difference between the two
    images.

    .. code-block:: python

        out = abs(image1 - image2)

    :rtype: :py:class:`~PIL.Image.Image`
    )r   r   r   Úchop_differencer   r   r   r	   Ú
differenceX   r   r   c                 C   r   )a6  
    Superimposes two images on top of each other.

    If you multiply an image with a solid black image, the result is black. If
    you multiply with a solid white image, the image is unaffected.

    .. code-block:: python

        out = image1 * image2 / MAX

    :rtype: :py:class:`~PIL.Image.Image`
    )r   r   r   Úchop_multiplyr   r   r   r	   Úmultiplyi   s   r   c                 C   r   )zÃ
    Superimposes two inverted images on top of each other.

    .. code-block:: python

        out = MAX - ((MAX - image1) * (MAX - image2) / MAX)

    :rtype: :py:class:`~PIL.Image.Image`
    )r   r   r   Úchop_screenr   r   r   r	   Úscreen|   s   r!   c                 C   r   )z
    Superimposes two images on top of each other using the Soft Light algorithm

    :rtype: :py:class:`~PIL.Image.Image`
    )r   r   r   Úchop_soft_lightr   r   r   r	   Ú
soft_lightŒ   ó   r#   c                 C   r   )z
    Superimposes two images on top of each other using the Hard Light algorithm

    :rtype: :py:class:`~PIL.Image.Image`
    )r   r   r   Úchop_hard_lightr   r   r   r	   Ú
hard_light˜   r$   r&   c                 C   r   )z|
    Superimposes two images on top of each other using the Overlay algorithm

    :rtype: :py:class:`~PIL.Image.Image`
    )r   r   r   Úchop_overlayr   r   r   r	   Úoverlay¤   r$   r(   ç      ð?é    c                 C   ó(   |   ¡  |  ¡  |  | j |j||¡¡S )a  
    Adds two images, dividing the result by scale and adding the
    offset. If omitted, scale defaults to 1.0, and offset to 0.0.

    .. code-block:: python

        out = ((image1 + image2) / scale + offset)

    :rtype: :py:class:`~PIL.Image.Image`
    )r   r   r   Úchop_add©r   r   ÚscaleÚoffsetr   r   r	   Úadd°   ó   r0   c                 C   r+   )a  
    Subtracts two images, dividing the result by scale and adding the offset.
    If omitted, scale defaults to 1.0, and offset to 0.0.

    .. code-block:: python

        out = ((image1 - image2) / scale + offset)

    :rtype: :py:class:`~PIL.Image.Image`
    )r   r   r   Úchop_subtractr-   r   r   r	   ÚsubtractÁ   r1   r3   c                 C   r   )z Add two images, without clipping the result.

    .. code-block:: python

        out = ((image1 + image2) % MAX)

    :rtype: :py:class:`~PIL.Image.Image`
    )r   r   r   Úchop_add_modulor   r   r   r	   Ú
add_moduloÒ   ó   
r5   c                 C   r   )z¥Subtract two images, without clipping the result.

    .. code-block:: python

        out = ((image1 - image2) % MAX)

    :rtype: :py:class:`~PIL.Image.Image`
    )r   r   r   Úchop_subtract_modulor   r   r   r	   Úsubtract_moduloá   r6   r8   c                 C   r   )aƒ  Logical AND between two images.

    Both of the images must have mode "1". If you would like to perform a
    logical AND on an image with a mode other than "1", try
    :py:meth:`~PIL.ImageChops.multiply` instead, using a black-and-white mask
    as the second image.

    .. code-block:: python

        out = ((image1 and image2) % MAX)

    :rtype: :py:class:`~PIL.Image.Image`
    )r   r   r   Úchop_andr   r   r   r	   Úlogical_andð   s   r:   c                 C   r   )z¿Logical OR between two images.

    Both of the images must have mode "1".

    .. code-block:: python

        out = ((image1 or image2) % MAX)

    :rtype: :py:class:`~PIL.Image.Image`
    )r   r   r   Úchop_orr   r   r   r	   Ú
logical_or  r   r<   c                 C   r   )zÌLogical XOR between two images.

    Both of the images must have mode "1".

    .. code-block:: python

        out = ((bool(image1) != bool(image2)) % MAX)

    :rtype: :py:class:`~PIL.Image.Image`
    )r   r   r   Úchop_xorr   r   r   r	   Úlogical_xor  r   r>   c                 C   ó   t  | ||¡S )z‰Blend images using constant transparency weight. Alias for
    :py:func:`PIL.Image.blend`.

    :rtype: :py:class:`~PIL.Image.Image`
    )r   Úblend)r   r   Úalphar   r   r	   r@   &  ó   r@   c                 C   r?   )z†Create composite using transparency mask. Alias for
    :py:func:`PIL.Image.composite`.

    :rtype: :py:class:`~PIL.Image.Image`
    )r   Ú	composite)r   r   Úmaskr   r   r	   rC   0  rB   rC   Nc                 C   s(   |du r|}|   ¡  |  | j ||¡¡S )a~  Returns a copy of the image where data has been offset by the given
    distances. Data wraps around the edges. If ``yoffset`` is omitted, it
    is assumed to be equal to ``xoffset``.

    :param xoffset: The horizontal distance.
    :param yoffset: The vertical distance.  If omitted, both
        distances are set to the same value.
    :rtype: :py:class:`~PIL.Image.Image`
    N)r   r   r   r/   )r   ÚxoffsetÚyoffsetr   r   r	   r/   :  s   r/   )r)   r*   )N)Ú r   r
   r   r   r   r   r   r   r!   r#   r&   r(   r0   r3   r5   r8   r:   r<   r>   r@   rC   r/   r   r   r   r	   Ú<module>   s,   		



