Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
ImageChops.cpython-313.pyc160 linesDownload Raw Back to __pycache__
1�

2v�jA ��2�SSKJr SSKJr SSjrSSjrSSjrSSjrSSjrSS	jr	SS3jr4SSjrSSjrSS
jr
SSjrSSSjjrSSSjjrSSjrSSjrSSjrSSjrSSjrSSjrS SjrS!S"Sjjrg)#�)�annotations�)�Imagec�F�[R"SURU5$)zNFill a channel with a given gray level.5 6:rtype: :py:class:`~PIL.Image.Image`7�L)r�new�size)�image�values  �TD:\code\apps\devtools\python\user_packages\Python313\site-packages\PIL/ImageChops.py�constantr
s���9�9�S�%�*�*�e�,�,�c�"�UR5$)zaCopy a channel. Alias for :py:meth:`PIL.Image.Image.copy`.8 9:rtype: :py:class:`~PIL.Image.Image`10)�copy�r11s r�	duplicater s���:�:�<�rc�t�UR5 URURR55$)z\12Invert an image (channel). ::13 14    out = MAX - image15 16:rtype: :py:class:`~PIL.Image.Image`17)�load�_new�im�chop_invertrs r�invertr)s)��18�J�J�L��:�:�e�h�h�*�*�,�-�-rc��UR5 UR5 URURRUR55$)z�19Compares the two images, pixel by pixel, and returns a new image containing20the lighter values. ::21 22    out = max(image1, image2)23 24:rtype: :py:class:`~PIL.Image.Image`25)rrr�chop_lighter��image1�image2s  r�lighterr6s8���K�K�M�26�K�K�M��;�;�v�y�y�-�-�f�i�i�8�9�9rc��UR5 UR5 URURRUR55$)z�27Compares the two images, pixel by pixel, and returns a new image containing28the darker values. ::29 30    out = min(image1, image2)31 32:rtype: :py:class:`~PIL.Image.Image`33)rrr�chop_darkerrs  r�darkerr!Es8���K�K�M�34�K�K�M��;�;�v�y�y�,�,�V�Y�Y�7�8�8rc��UR5 UR5 URURRUR55$)z�35Returns the absolute value of the pixel-by-pixel difference between the two36images. ::37 38    out = abs(image1 - image2)39 40:rtype: :py:class:`~PIL.Image.Image`41)rrr�chop_differencers  r�42differencer$Ts8���K�K�M�43�K�K�M��;�;�v�y�y�0�0����;�<�<rc��UR5 UR5 URURRUR55$)a44Superimposes two images on top of each other.45 46If you multiply an image with a solid black image, the result is black. If47you multiply with a solid white image, the image is unaffected. ::48 49    out = image1 * image2 / MAX50 51:rtype: :py:class:`~PIL.Image.Image`52)rrr�
chop_multiplyrs  r�multiplyr'cs8���K�K�M�53�K�K�M��;�;�v�y�y�.�.�v�y�y�9�:�:rc��UR5 UR5 URURRUR55$)z�54Superimposes two inverted images on top of each other. ::55 56    out = MAX - ((MAX - image1) * (MAX - image2) / MAX)57 58:rtype: :py:class:`~PIL.Image.Image`59)rrr�chop_screenrs  r�screenr*ts8���K�K�M�60�K�K�M��;�;�v�y�y�,�,�V�Y�Y�7�8�8rc��UR5 UR5 URURRUR55$)zs61Superimposes two images on top of each other using the Soft Light algorithm62 63:rtype: :py:class:`~PIL.Image.Image`64)rrr�chop_soft_lightrs  r�65soft_lightr-��8���K�K�M�66�K�K�M��;�;�v�y�y�0�0����;�<�<rc��UR5 UR5 URURRUR55$)zs67Superimposes two images on top of each other using the Hard Light algorithm68 69:rtype: :py:class:`~PIL.Image.Image`70)rrr�chop_hard_lightrs  r�71hard_lightr1�r.rc��UR5 UR5 URURRUR55$)zp72Superimposes two images on top of each other using the Overlay algorithm73 74:rtype: :py:class:`~PIL.Image.Image`75)rrr�chop_overlayrs  r�overlayr4�s8���K�K�M�76�K�K�M��;�;�v�y�y�-�-�f�i�i�8�9�9rc��UR5 UR5 URURRURX#55$)z�77Adds two images, dividing the result by scale and adding the78offset. If omitted, scale defaults to 1.0, and offset to 0.0. ::79 80    out = ((image1 + image2) / scale + offset)81 82:rtype: :py:class:`~PIL.Image.Image`83)rrr�chop_add�rr�scale�offsets    r�addr:�s:���K�K�M�84�K�K�M��;�;�v�y�y�)�)�&�)�)�U�C�D�Drc��UR5 UR5 URURRURX#55$)z�85Subtracts two images, dividing the result by scale and adding the offset.86If omitted, scale defaults to 1.0, and offset to 0.0. ::87 88    out = ((image1 - image2) / scale + offset)89 90:rtype: :py:class:`~PIL.Image.Image`91)rrr�
chop_subtractr7s    r�subtractr=�s:���K�K�M�92�K�K�M��;�;�v�y�y�.�.�v�y�y�%�H�I�Irc��UR5 UR5 URURRUR55$)z{Add two images, without clipping the result. ::93 94    out = ((image1 + image2) % MAX)95 96:rtype: :py:class:`~PIL.Image.Image`97)rrr�chop_add_modulors  r�98add_modulor@�s8���K�K�M�99�K�K�M��;�;�v�y�y�0�0����;�<�<rc��UR5 UR5 URURRUR55$)z�Subtract two images, without clipping the result. ::100 101    out = ((image1 - image2) % MAX)102 103:rtype: :py:class:`~PIL.Image.Image`104)rrr�chop_subtract_modulors  r�subtract_modulorC�s8���K�K�M�105�K�K�M��;�;�v�y�y�5�5�f�i�i�@�A�Arc��UR5 UR5 URURRUR55$)aNLogical AND between two images.106 107Both of the images must have mode "1". If you would like to perform a108logical AND on an image with a mode other than "1", try109:py:meth:`~PIL.ImageChops.multiply` instead, using a black-and-white mask110as the second image. ::111 112    out = ((image1 and image2) % MAX)113 114:rtype: :py:class:`~PIL.Image.Image`115)rrr�chop_andrs  r�logical_andrF�s8���K�K�M�116�K�K�M��;�;�v�y�y�)�)�&�)�)�4�5�5rc��UR5 UR5 URURRUR55$)z�Logical OR between two images.117 118Both of the images must have mode "1". ::119 120    out = ((image1 or image2) % MAX)121 122:rtype: :py:class:`~PIL.Image.Image`123)rrr�chop_orrs  r�124logical_orrI�s8���K�K�M�125�K�K�M��;�;�v�y�y�(�(����3�4�4rc��UR5 UR5 URURRUR55$)z�Logical XOR between two images.126 127Both of the images must have mode "1". ::128 129    out = ((bool(image1) != bool(image2)) % MAX)130 131:rtype: :py:class:`~PIL.Image.Image`132)rrr�chop_xorrs  r�logical_xorrLs8���K�K�M�133�K�K�M��;�;�v�y�y�)�)�&�)�)�4�5�5rc�0�[R"XU5$)z}Blend images using constant transparency weight. Alias for134:py:func:`PIL.Image.blend`.135 136:rtype: :py:class:`~PIL.Image.Image`137)r�blend)rr�alphas   rrNrNs���;�;�v�u�-�-rc�0�[R"XU5$)zzCreate composite using transparency mask. Alias for138:py:func:`PIL.Image.composite`.139 140:rtype: :py:class:`~PIL.Image.Image`141)r�	composite)rr�masks   rrQrQs���?�?�6�4�0�0rNc��UcUnUR5 URURRX55$)a}Returns a copy of the image where data has been offset by the given142distances. Data wraps around the edges. If ``yoffset`` is omitted, it143is assumed to be equal to ``xoffset``.144 145:param image: Input image.146:param xoffset: The horizontal distance.147:param yoffset: The vertical distance.  If omitted, both148    distances are set to the same value.149:rtype: :py:class:`~PIL.Image.Image`150)rrrr9)r151�xoffset�yoffsets   rr9r9(s3������	�J�J�L��:�:�e�h�h�o�o�g�7�8�8r)r152�Image.Imager�int�returnrV)r153rVrXrV)rrVrrVrXrV)g�?r)154rrVrrVr8�floatr9rYrXrV)rrVrrVrOrYrXrV)rrVrrVrRrVrXrV)N)r155rVrTrWrUz156int | NonerXrV)�157__future__r�rr
rrrr!r$r'r*r-r1r4r:r=r@rCrFrIrLrNrQr9�rr�<module>r]s��$#��-��158.�:�9�=�;�"9�	=�	=�	:�ST�E��E�!,�E�5:�E�JO�E��E�$ST�J��J�!,�J�5:�J�JO�J��J�"159=�160B�6�$5�6�.�	1��	1�!,�	1�4?�	1��	1�9r
codekingpro/portable-devtools · Team Ai