HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/env/lib/python3.10/site-packages/PIL/__pycache__/ImageChops.cpython-310.pyc
o

we[�@s�ddlmZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zd/dd�Z
d/dd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd0d-d.�Zd,S)1�)�ImagecCst�d|j|�S)zVFill a channel with a given grey level.

    :rtype: :py:class:`~PIL.Image.Image`
    �L)r�new�size)�image�value�r�G/home/arjun/projects/env/lib/python3.10/site-packages/PIL/ImageChops.py�constantsr
cCs|��S)ziCopy a channel. Alias for :py:meth:`PIL.Image.Image.copy`.

    :rtype: :py:class:`~PIL.Image.Image`
    )�copy�rrrr	�	duplicatesr
cCs|��|�|j���S)zl
    Invert an image (channel). ::

        out = MAX - image

    :rtype: :py:class:`~PIL.Image.Image`
    )�load�_new�im�chop_invertrrrr	�invert's	rcC�$|��|��|�|j�|j��S)z�
    Compares the two images, pixel by pixel, and returns a new image containing
    the lighter values. ::

        out = max(image1, image2)

    :rtype: :py:class:`~PIL.Image.Image`
    )rrr�chop_lighter��image1�image2rrr	�lighter4�
rcCr)z�
    Compares the two images, pixel by pixel, and returns a new image containing
    the darker values. ::

        out = min(image1, image2)

    :rtype: :py:class:`~PIL.Image.Image`
    )rrr�chop_darkerrrrr	�darkerCrrcCr)z�
    Returns the absolute value of the pixel-by-pixel difference between the two
    images. ::

        out = abs(image1 - image2)

    :rtype: :py:class:`~PIL.Image.Image`
    )rrr�chop_differencerrrr	�
differenceRrrcCr)a
    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. ::

        out = image1 * image2 / MAX

    :rtype: :py:class:`~PIL.Image.Image`
    )rrr�
chop_multiplyrrrr	�multiplyasrcCr)z�
    Superimposes two inverted images on top of each other. ::

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

    :rtype: :py:class:`~PIL.Image.Image`
    )rrr�chop_screenrrrr	�screenrs	r!cCr)z
    Superimposes two images on top of each other using the Soft Light algorithm

    :rtype: :py:class:`~PIL.Image.Image`
    )rrr�chop_soft_lightrrrr	�
soft_light��r#cCr)z
    Superimposes two images on top of each other using the Hard Light algorithm

    :rtype: :py:class:`~PIL.Image.Image`
    )rrr�chop_hard_lightrrrr	�
hard_light�r$r&cCr)z|
    Superimposes two images on top of each other using the Overlay algorithm

    :rtype: :py:class:`~PIL.Image.Image`
    )rrr�chop_overlayrrrr	�overlay�r$r(��?�cC�(|��|��|�|j�|j||��S)z�
    Adds two images, dividing the result by scale and adding the
    offset. If omitted, scale defaults to 1.0, and offset to 0.0. ::

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

    :rtype: :py:class:`~PIL.Image.Image`
    )rrr�chop_add�rr�scale�offsetrrr	�add��
r0cCr+)z�
    Subtracts two images, dividing the result by scale and adding the offset.
    If omitted, scale defaults to 1.0, and offset to 0.0. ::

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

    :rtype: :py:class:`~PIL.Image.Image`
    )rrr�
chop_subtractr-rrr	�subtract�r1r3cCr)z�Add two images, without clipping the result. ::

        out = ((image1 + image2) % MAX)

    :rtype: :py:class:`~PIL.Image.Image`
    )rrr�chop_add_modulorrrr	�
add_modulo��r5cCr)z�Subtract two images, without clipping the result. ::

        out = ((image1 - image2) % MAX)

    :rtype: :py:class:`~PIL.Image.Image`
    )rrr�chop_subtract_modulorrrr	�subtract_modulo�r6r8cCr)ajLogical 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. ::

        out = ((image1 and image2) % MAX)

    :rtype: :py:class:`~PIL.Image.Image`
    )rrr�chop_andrrrr	�logical_and�s
r:cCr)z�Logical OR between two images.

    Both of the images must have mode "1". ::

        out = ((image1 or image2) % MAX)

    :rtype: :py:class:`~PIL.Image.Image`
    )rrr�chop_orrrrr	�
logical_or�rr<cCr)z�Logical XOR between two images.

    Both of the images must have mode "1". ::

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

    :rtype: :py:class:`~PIL.Image.Image`
    )rrr�chop_xorrrrr	�logical_xor�rr>cC�t�|||�S)z�Blend images using constant transparency weight. Alias for
    :py:func:`PIL.Image.blend`.

    :rtype: :py:class:`~PIL.Image.Image`
    )r�blend)rr�alpharrr	r@�r@cCr?)z�Create composite using transparency mask. Alias for
    :py:func:`PIL.Image.composite`.

    :rtype: :py:class:`~PIL.Image.Image`
    )r�	composite)rr�maskrrr	rCrBrCNcCs(|dur|}|��|�|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 image: Input image.
    :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)rrrr/)r�xoffset�yoffsetrrr	r/ sr/)r)r*)N)�rr
r
rrrrrr!r#r&r(r0r3r5r8r:r<r>r@rCr/rrrr	�<module>s,