HEX
Server: Apache
System: Linux srv1.prosuiteplus.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: prosuiteplus (1001)
PHP: 8.3.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/PIL/__pycache__/ImageChops.cpython-38.pyc
U

g�
^~�@s�ddlmZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Zdd�Z	d)dd�Z
d*dd�Zdd�Zdd�Z
dd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd+d'd(�Zd&S),�)�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�0/usr/lib/python3/dist-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)z�
    Invert an image (channel).

    .. code-block:: python

        out = MAX - image

    :rtype: :py:class:`~PIL.Image.Image`
    )�load�_new�imZchop_invertrrrr	�invert'srcCs$|��|��|�|j�|j��S)a
    Compares the two images, pixel by pixel, and returns a new image containing
    the lighter values. At least one of the images must have mode "1".

    .. code-block:: python

        out = max(image1, image2)

    :rtype: :py:class:`~PIL.Image.Image`
    )rrrZchop_lighter��image1�image2rrr	�lighter6srcCs$|��|��|�|j�|j��S)a
    Compares the two images, pixel by pixel, and returns a new image containing
    the darker values. At least one of the images must have mode "1".

    .. code-block:: python

        out = min(image1, image2)

    :rtype: :py:class:`~PIL.Image.Image`
    )rrrZchop_darkerrrrr	�darkerGsrcCs$|��|��|�|j�|j��S)z�
    Returns the absolute value of the pixel-by-pixel difference between the two
    images. At least one of the images must have mode "1".

    .. code-block:: python

        out = abs(image1 - image2)

    :rtype: :py:class:`~PIL.Image.Image`
    )rrrZchop_differencerrrr	�
differenceXsrcCs$|��|��|�|j�|j��S)ai
    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. At least
    one of the images must have mode "1".

    .. code-block:: python

        out = image1 * image2 / MAX

    :rtype: :py:class:`~PIL.Image.Image`
    )rrrZ
chop_multiplyrrrr	�multiplyisrcCs$|��|��|�|j�|j��S)z�
    Superimposes two inverted images on top of each other. At least one of the
    images must have mode "1".

    .. code-block:: python

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

    :rtype: :py:class:`~PIL.Image.Image`
    )rrrZchop_screenrrrr	�screen}sr��?�cCs(|��|��|�|j�|j||��S)a5
    Adds two images, dividing the result by scale and adding the
    offset. If omitted, scale defaults to 1.0, and offset to 0.0.
    At least one of the images must have mode "1".

    .. code-block:: python

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

    :rtype: :py:class:`~PIL.Image.Image`
    )rrrZchop_add�rrZscale�offsetrrr	�add�s
rcCs(|��|��|�|j�|j||��S)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. At least one of the
    images must have mode "1".

    .. code-block:: python

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

    :rtype: :py:class:`~PIL.Image.Image`
    )rrrZ
chop_subtractrrrr	�subtract�s
rcCs$|��|��|�|j�|j��S)z�Add two images, without clipping the result. At least one of the images
    must have mode "1".

    .. code-block:: python

        out = ((image1 + image2) % MAX)

    :rtype: :py:class:`~PIL.Image.Image`
    )rrrZchop_add_modulorrrr	�
add_modulo�sr cCs$|��|��|�|j�|j��S)z�Subtract two images, without clipping the result. At least one of the
    images must have mode "1".

    .. code-block:: python

        out = ((image1 - image2) % MAX)

    :rtype: :py:class:`~PIL.Image.Image`
    )rrrZchop_subtract_modulorrrr	�subtract_modulo�sr!cCs$|��|��|�|j�|j��S)z�Logical AND between two images. At least one of the images must have
    mode "1".

    .. code-block:: python

        out = ((image1 and image2) % MAX)

    :rtype: :py:class:`~PIL.Image.Image`
    )rrrZchop_andrrrr	�logical_and�sr"cCs$|��|��|�|j�|j��S)z�Logical OR between two images. At least one of the images must have
    mode "1".

    .. code-block:: python

        out = ((image1 or image2) % MAX)

    :rtype: :py:class:`~PIL.Image.Image`
    )rrrZchop_orrrrr	�
logical_or�sr#cCs$|��|��|�|j�|j��S)z�Logical XOR between two images. At least one of the images must have
    mode "1".

    .. code-block:: python

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

    :rtype: :py:class:`~PIL.Image.Image`
    )rrrZchop_xorrrrr	�logical_xor�sr$cCst�|||�S)z�Blend images using constant transparency weight. Alias for
    :py:meth:`PIL.Image.Image.blend`.

    :rtype: :py:class:`~PIL.Image.Image`
    )r�blend)rrZalpharrr	r%sr%cCst�|||�S)z�Create composite using transparency mask. Alias for
    :py:meth:`PIL.Image.Image.composite`.

    :rtype: :py:class:`~PIL.Image.Image`
    )r�	composite)rr�maskrrr	r&sr&NcCs(|dkr|}|��|�|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)rrrr)rZxoffsetZyoffsetrrr	rsr)rr)rr)N)�rr
r
rrrrrrrrr r!r"r#r$r%r&rrrrr	�<module>s$