o
    sh
                     @  s   d dl mZ ddlmZ d>d	d
Zd?ddZd?ddZd@ddZd@ddZd@ddZ	d@ddZ
d@ddZd@ddZd@ddZd@dd Z	 dAdBd%d&Z	 dAdBd'd(Zd@d)d*Zd@d+d,Zd@d-d.Zd@d/d0Zd@d1d2ZdCd4d5ZdDd7d8ZdEdFd=d$Zd9S )G    )annotations   )ImageimageImage.Imagevalueintreturnc                 C  s   t d| j|S )zVFill a channel with a given gray level.

    :rtype: :py:class:`~PIL.Image.Image`
    L)r   newsize)r   r    r   b/var/www/html/construction_image-detection-poc/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 )zl
    Invert an image (channel). ::

        out = MAX - image

    :rtype: :py:class:`~PIL.Image.Image`
    )load_newimchop_invertr   r   r   r   invert)   s   	r   image1image2c                 C  $   |    |   | | 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`
    )r   r   r   chop_lighterr   r   r   r   r   lighter6      
r   c                 C  r   )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`
    )r   r   r   chop_darkerr   r   r   r   darkerE   r   r    c                 C  r   )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`
    )r   r   r   chop_differencer   r   r   r   
differenceT   r   r"   c                 C  r   )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`
    )r   r   r   chop_multiplyr   r   r   r   multiplyc   s   r$   c                 C  r   )z
    Superimposes two inverted images on top of each other. ::

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

    :rtype: :py:class:`~PIL.Image.Image`
    )r   r   r   chop_screenr   r   r   r   screent   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-         ?scalefloatoffsetc                 C  (   |    |   | | 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`
    )r   r   r   chop_addr   r   r/   r1   r   r   r   add      r5   c                 C  r2   )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`
    )r   r   r   chop_subtractr4   r   r   r   subtract   r6   r8   c                 C  r   )zAdd two images, without clipping the result. ::

        out = ((image1 + image2) % MAX)

    :rtype: :py:class:`~PIL.Image.Image`
    )r   r   r   chop_add_modulor   r   r   r   
add_modulo      r:   c                 C  r   )zSubtract two images, without clipping the result. ::

        out = ((image1 - image2) % MAX)

    :rtype: :py:class:`~PIL.Image.Image`
    )r   r   r   chop_subtract_modulor   r   r   r   subtract_modulo   r;   r=   c                 C  r   )aj  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. ::

        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   )zLogical OR between two images.

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

        out = ((image1 or image2) % MAX)

    :rtype: :py:class:`~PIL.Image.Image`
    )r   r   r   chop_orr   r   r   r   
logical_or   r   rA   c                 C  r   )zLogical XOR between two images.

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

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

    :rtype: :py:class:`~PIL.Image.Image`
    )r   r   r   chop_xorr   r   r   r   logical_xor  r   rC   alphac                 C     t | ||S )zBlend images using constant transparency weight. Alias for
    :py:func:`PIL.Image.blend`.

    :rtype: :py:class:`~PIL.Image.Image`
    )r   blend)r   r   rD   r   r   r   rF     s   rF   maskc                 C  rE   )zCreate composite using transparency mask. Alias for
    :py:func:`PIL.Image.composite`.

    :rtype: :py:class:`~PIL.Image.Image`
    )r   	composite)r   r   rG   r   r   r   rH     s   	rH   Nxoffsetyoffset
int | Nonec                 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 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)r   r   r   r1   )r   rI   rJ   r   r   r   r1   (  s   )r   r   r   r   r	   r   )r   r   r	   r   )r   r   r   r   r	   r   )r.   r   )
r   r   r   r   r/   r0   r1   r0   r	   r   )r   r   r   r   rD   r0   r	   r   )r   r   r   r   rG   r   r	   r   )N)r   r   rI   r   rJ   rK   r	   r   )
__future__r    r   r   r   r   r   r    r"   r$   r&   r(   r+   r-   r5   r8   r:   r=   r?   rA   rC   rF   rH   r1   r   r   r   r   <module>   s2   

	
	















