%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/PIL/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/PIL/__pycache__/ImageChops.cpython-312.pyc

�

��e
���ddlmZddlmZdd�Zdd�Zdd�Zdd�Zdd�Zdd	�Z	dd
�Z
dd�Zdd�Zdd
�Z
dd�Z	d									dd�Z	d									dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Z								d d�Zd!d"d�Zy)#�)�annotations�)�Imagec�D�tjd|j|�S)zVFill a channel with a given gray level.

    :rtype: :py:class:`~PIL.Image.Image`
    �L)r�new�size)�image�values  �0/usr/lib/python3/dist-packages/PIL/ImageChops.py�constantr
s���9�9�S�%�*�*�e�,�,�c�"�|j�S)ziCopy a channel. Alias for :py:meth:`PIL.Image.Image.copy`.

    :rtype: :py:class:`~PIL.Image.Image`
    )�copy�r
s r�	duplicater s���:�:�<�rc�t�|j�|j|jj��S)zl
    Invert an image (channel). ::

        out = MAX - image

    :rtype: :py:class:`~PIL.Image.Image`
    )�load�_new�im�chop_invertrs r�invertr)s)��
�J�J�L��:�:�e�h�h�*�*�,�-�-rc��|j�|j�|j|jj|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�image2s  r�lighterr6s8���K�K�M�
�K�K�M��;�;�v�y�y�-�-�f�i�i�8�9�9rc��|j�|j�|j|jj|j��S)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_darkerrs  r�darkerr!Es8���K�K�M�
�K�K�M��;�;�v�y�y�,�,�V�Y�Y�7�8�8rc��|j�|j�|j|jj|j��S)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_differencers  r�
differencer$Ts8���K�K�M�
�K�K�M��;�;�v�y�y�0�0����;�<�<rc��|j�|j�|j|jj|j��S)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_multiplyrs  r�multiplyr'cs8���K�K�M�
�K�K�M��;�;�v�y�y�.�.�v�y�y�9�:�:rc��|j�|j�|j|jj|j��S)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_screenrs  r�screenr*ts8���K�K�M�
�K�K�M��;�;�v�y�y�,�,�V�Y�Y�7�8�8rc��|j�|j�|j|jj|j��S)z
    Superimposes two images on top of each other using the Soft Light algorithm

    :rtype: :py:class:`~PIL.Image.Image`
    )rrr�chop_soft_lightrs  r�
soft_lightr-��8���K�K�M�
�K�K�M��;�;�v�y�y�0�0����;�<�<rc��|j�|j�|j|jj|j��S)z
    Superimposes two images on top of each other using the Hard Light algorithm

    :rtype: :py:class:`~PIL.Image.Image`
    )rrr�chop_hard_lightrs  r�
hard_lightr1�r.rc��|j�|j�|j|jj|j��S)z|
    Superimposes two images on top of each other using the Overlay algorithm

    :rtype: :py:class:`~PIL.Image.Image`
    )rrr�chop_overlayrs  r�overlayr4�s8���K�K�M�
�K�K�M��;�;�v�y�y�-�-�f�i�i�8�9�9rc��|j�|j�|j|jj|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�offsets    r�addr:�s<���K�K�M�
�K�K�M��;�;�v�y�y�)�)�&�)�)�U�F�C�D�Drc��|j�|j�|j|jj|j||��S)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_subtractr7s    r�subtractr=�s<���K�K�M�
�K�K�M��;�;�v�y�y�.�.�v�y�y�%��H�I�Irc��|j�|j�|j|jj|j��S)z�Add two images, without clipping the result. ::

        out = ((image1 + image2) % MAX)

    :rtype: :py:class:`~PIL.Image.Image`
    )rrr�chop_add_modulors  r�
add_modulor@�s8���K�K�M�
�K�K�M��;�;�v�y�y�0�0����;�<�<rc��|j�|j�|j|jj|j��S)z�Subtract two images, without clipping the result. ::

        out = ((image1 - image2) % MAX)

    :rtype: :py:class:`~PIL.Image.Image`
    )rrr�chop_subtract_modulors  r�subtract_modulorC�s8���K�K�M�
�K�K�M��;�;�v�y�y�5�5�f�i�i�@�A�Arc��|j�|j�|j|jj|j��S)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_andrs  r�logical_andrF�s8���K�K�M�
�K�K�M��;�;�v�y�y�)�)�&�)�)�4�5�5rc��|j�|j�|j|jj|j��S)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_orrs  r�
logical_orrI�s8���K�K�M�
�K�K�M��;�;�v�y�y�(�(����3�4�4rc��|j�|j�|j|jj|j��S)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_xorrs  r�logical_xorrLs8���K�K�M�
�K�K�M��;�;�v�y�y�)�)�&�)�)�4�5�5rc�0�tj|||�S)z�Blend images using constant transparency weight. Alias for
    :py:func:`PIL.Image.blend`.

    :rtype: :py:class:`~PIL.Image.Image`
    )r�blend)rr�alphas   rrNrNs���;�;�v�v�u�-�-rc�0�tj|||�S)z�Create composite using transparency mask. Alias for
    :py:func:`PIL.Image.composite`.

    :rtype: :py:class:`~PIL.Image.Image`
    )r�	composite)rr�masks   rrQrQs���?�?�6�6�4�0�0rNc��|�|}|j�|j|jj||��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`
    )rrrr9)r
�xoffset�yoffsets   rr9r9(s5������	�J�J�L��:�:�e�h�h�o�o�g�w�7�8�8r)r
�Image.Imager�int�returnrV)r
rVrXrV)rrVrrVrXrV)g�?r)
rrVrrVr8�floatr9rYrXrV)rrVrrVrOrYrXrV)rrVrrVrRrVrXrV)N)r
rVrTrWrUz
int | NonerXrV)�
__future__r�rr
rrrr!r$r'r*r-r1r4r:r=r@rCrFrIrLrNrQr9�rr�<module>r]s��$#��-��
.�:�9�=�;�"9�	=�	=�	:�ST�E��E�!,�E�5:�E�JO�E��E�$ST�J��J�!,�J�5:�J�JO�J��J�"
=�
B�6�$5�6�.�	1��	1�!,�	1�4?�	1��	1�9r

Zerion Mini Shell 1.0