Files
sirh/venv/lib/python3.12/site-packages/PIL/__pycache__/ImageChops.cpython-312.pyc

161 lines
11 KiB
Plaintext
Raw Normal View History

2026-04-29 11:52:03 +02:00
<EFBFBD>
<00><><EFBFBD>i
<00><01><00>ddlmZddlmZdd<04>Zdd<05>Zdd<06>Zdd<07>Zdd<08>Zdd <09>Z dd
<EFBFBD>Z
dd <0B>Z dd <0C>Z dd <0A>Z dd<0E>Z d dd<0F>Z d dd<10>Zdd<11>Zdd<12>Zdd<13>Zdd<14>Zdd<15>Zdd<16>Z d d<17>Zd!d"d<19>Zy)#<23>)<01> annotations<6E>)<01>Imagec<01>D<00>tjd|j|<01>S)zVFill a channel with a given gray level.
:rtype: :py:class:`~PIL.Image.Image`
<20>L)r<00>new<65>size)<02>image<67>values <20>K/home/fatima/modif/sirh/venv/lib/python3.12/site-packages/PIL/ImageChops.py<70>constantr s<00><00> <11>9<EFBFBD>9<EFBFBD>S<EFBFBD>%<25>*<2A>*<2A>e<EFBFBD> ,<2C>,<2C>c<01>"<00>|j<00>S)ziCopy a channel. Alias for :py:meth:`PIL.Image.Image.copy`.
:rtype: :py:class:`~PIL.Image.Image`
)<01>copy<70>r
s r <00> duplicater s<00><00> <11>:<3A>:<3A><<3C>rc<01>t<00>|j<00>|j|jj<00><00>S)zl
Invert an image (channel). ::
out = MAX - image
:rtype: :py:class:`~PIL.Image.Image`
)<04>load<61>_new<65>im<69> chop_invertrs r <00>invertr)s)<00><00>
<EFBFBD>J<EFBFBD>J<EFBFBD>L<EFBFBD> <10>:<3A>:<3A>e<EFBFBD>h<EFBFBD>h<EFBFBD>*<2A>*<2A>,<2C> -<2D>-rc<01><><00>|j<00>|j<00>|j|jj|j<00><00>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<00> chop_lighter<65><02>image1<65>image2s r <00>lighterr6s8<00><00> <0B>K<EFBFBD>K<EFBFBD>M<EFBFBD>
<EFBFBD>K<EFBFBD>K<EFBFBD>M<EFBFBD> <11>;<3B>;<3B>v<EFBFBD>y<EFBFBD>y<EFBFBD>-<2D>-<2D>f<EFBFBD>i<EFBFBD>i<EFBFBD>8<> 9<>9rc<01><><00>|j<00>|j<00>|j|jj|j<00><00>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<00> chop_darkerrs r <00>darkerr!Es8<00><00> <0B>K<EFBFBD>K<EFBFBD>M<EFBFBD>
<EFBFBD>K<EFBFBD>K<EFBFBD>M<EFBFBD> <11>;<3B>;<3B>v<EFBFBD>y<EFBFBD>y<EFBFBD>,<2C>,<2C>V<EFBFBD>Y<EFBFBD>Y<EFBFBD>7<> 8<>8rc<01><><00>|j<00>|j<00>|j|jj|j<00><00>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<00>chop_differencers r <00>
differencer$Ts8<00><00> <0B>K<EFBFBD>K<EFBFBD>M<EFBFBD>
<EFBFBD>K<EFBFBD>K<EFBFBD>M<EFBFBD> <11>;<3B>;<3B>v<EFBFBD>y<EFBFBD>y<EFBFBD>0<>0<><16><19><19>;<3B> <<3C><rc<01><><00>|j<00>|j<00>|j|jj|j<00><00>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<00> chop_multiplyrs r <00>multiplyr'cs8<00><00> <0B>K<EFBFBD>K<EFBFBD>M<EFBFBD>
<EFBFBD>K<EFBFBD>K<EFBFBD>M<EFBFBD> <11>;<3B>;<3B>v<EFBFBD>y<EFBFBD>y<EFBFBD>.<2E>.<2E>v<EFBFBD>y<EFBFBD>y<EFBFBD>9<> :<3A>:rc<01><><00>|j<00>|j<00>|j|jj|j<00><00>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<00> chop_screenrs r <00>screenr*ts8<00><00> <0B>K<EFBFBD>K<EFBFBD>M<EFBFBD>
<EFBFBD>K<EFBFBD>K<EFBFBD>M<EFBFBD> <11>;<3B>;<3B>v<EFBFBD>y<EFBFBD>y<EFBFBD>,<2C>,<2C>V<EFBFBD>Y<EFBFBD>Y<EFBFBD>7<> 8<>8rc<01><><00>|j<00>|j<00>|j|jj|j<00><00>S)z
Superimposes two images on top of each other using the Soft Light algorithm
:rtype: :py:class:`~PIL.Image.Image`
)rrr<00>chop_soft_lightrs r <00>
soft_lightr-<00><00>8<00><00> <0B>K<EFBFBD>K<EFBFBD>M<EFBFBD>
<EFBFBD>K<EFBFBD>K<EFBFBD>M<EFBFBD> <11>;<3B>;<3B>v<EFBFBD>y<EFBFBD>y<EFBFBD>0<>0<><16><19><19>;<3B> <<3C><rc<01><><00>|j<00>|j<00>|j|jj|j<00><00>S)z
Superimposes two images on top of each other using the Hard Light algorithm
:rtype: :py:class:`~PIL.Image.Image`
)rrr<00>chop_hard_lightrs r <00>
hard_lightr1<00>r.rc<01><><00>|j<00>|j<00>|j|jj|j<00><00>S)z|
Superimposes two images on top of each other using the Overlay algorithm
:rtype: :py:class:`~PIL.Image.Image`
)rrr<00> chop_overlayrs r <00>overlayr4<00>s8<00><00> <0B>K<EFBFBD>K<EFBFBD>M<EFBFBD>
<EFBFBD>K<EFBFBD>K<EFBFBD>M<EFBFBD> <11>;<3B>;<3B>v<EFBFBD>y<EFBFBD>y<EFBFBD>-<2D>-<2D>f<EFBFBD>i<EFBFBD>i<EFBFBD>8<> 9<>9rc<01><><00>|j<00>|j<00>|j|jj|j||<03><00>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<00>chop_add<64>rr<00>scale<6C>offsets r <00>addr:<00>s<<00><00> <0B>K<EFBFBD>K<EFBFBD>M<EFBFBD>
<EFBFBD>K<EFBFBD>K<EFBFBD>M<EFBFBD> <11>;<3B>;<3B>v<EFBFBD>y<EFBFBD>y<EFBFBD>)<29>)<29>&<26>)<29>)<29>U<EFBFBD>F<EFBFBD>C<> D<>Drc<01><><00>|j<00>|j<00>|j|jj|j||<03><00>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<00> chop_subtractr7s r <00>subtractr=<00>s<<00><00> <0B>K<EFBFBD>K<EFBFBD>M<EFBFBD>
<EFBFBD>K<EFBFBD>K<EFBFBD>M<EFBFBD> <11>;<3B>;<3B>v<EFBFBD>y<EFBFBD>y<EFBFBD>.<2E>.<2E>v<EFBFBD>y<EFBFBD>y<EFBFBD>%<25><16>H<> I<>Irc<01><><00>|j<00>|j<00>|j|jj|j<00><00>S)z<>Add two images, without clipping the result. ::
out = ((image1 + image2) % MAX)
:rtype: :py:class:`~PIL.Image.Image`
)rrr<00>chop_add_modulors r <00>
add_modulor@<00>s8<00><00> <0B>K<EFBFBD>K<EFBFBD>M<EFBFBD>
<EFBFBD>K<EFBFBD>K<EFBFBD>M<EFBFBD> <11>;<3B>;<3B>v<EFBFBD>y<EFBFBD>y<EFBFBD>0<>0<><16><19><19>;<3B> <<3C><rc<01><><00>|j<00>|j<00>|j|jj|j<00><00>S)z<>Subtract two images, without clipping the result. ::
out = ((image1 - image2) % MAX)
:rtype: :py:class:`~PIL.Image.Image`
)rrr<00>chop_subtract_modulors r <00>subtract_modulorC<00>s8<00><00> <0B>K<EFBFBD>K<EFBFBD>M<EFBFBD>
<EFBFBD>K<EFBFBD>K<EFBFBD>M<EFBFBD> <11>;<3B>;<3B>v<EFBFBD>y<EFBFBD>y<EFBFBD>5<>5<>f<EFBFBD>i<EFBFBD>i<EFBFBD>@<40> A<>Arc<01><><00>|j<00>|j<00>|j|jj|j<00><00>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<00>chop_andrs r <00> logical_andrF<00>s8<00><00> <0B>K<EFBFBD>K<EFBFBD>M<EFBFBD>
<EFBFBD>K<EFBFBD>K<EFBFBD>M<EFBFBD> <11>;<3B>;<3B>v<EFBFBD>y<EFBFBD>y<EFBFBD>)<29>)<29>&<26>)<29>)<29>4<> 5<>5rc<01><><00>|j<00>|j<00>|j|jj|j<00><00>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<00>chop_orrs r <00>
logical_orrI<00>s8<00><00> <0B>K<EFBFBD>K<EFBFBD>M<EFBFBD>
<EFBFBD>K<EFBFBD>K<EFBFBD>M<EFBFBD> <11>;<3B>;<3B>v<EFBFBD>y<EFBFBD>y<EFBFBD>(<28>(<28><16><19><19>3<> 4<>4rc<01><><00>|j<00>|j<00>|j|jj|j<00><00>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<00>chop_xorrs r <00> logical_xorrLs8<00><00> <0B>K<EFBFBD>K<EFBFBD>M<EFBFBD>
<EFBFBD>K<EFBFBD>K<EFBFBD>M<EFBFBD> <11>;<3B>;<3B>v<EFBFBD>y<EFBFBD>y<EFBFBD>)<29>)<29>&<26>)<29>)<29>4<> 5<>5rc<01>0<00>tj|||<02>S)z<>Blend images using constant transparency weight. Alias for
:py:func:`PIL.Image.blend`.
:rtype: :py:class:`~PIL.Image.Image`
)r<00>blend)rr<00>alphas r rNrNs<00><00> <11>;<3B>;<3B>v<EFBFBD>v<EFBFBD>u<EFBFBD> -<2D>-rc<01>0<00>tj|||<02>S)z<>Create composite using transparency mask. Alias for
:py:func:`PIL.Image.composite`.
:rtype: :py:class:`~PIL.Image.Image`
)r<00> composite)rr<00>masks r rQrQs<00><00> <11>?<3F>?<3F>6<EFBFBD>6<EFBFBD>4<EFBFBD> 0<>0rNc<01><><00>|<02>|}|j<00>|j|jj||<02><00>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
<00>xoffset<65>yoffsets r r9r9(s5<00><00><0F><EFBFBD><19><07> <09>J<EFBFBD>J<EFBFBD>L<EFBFBD> <10>:<3A>:<3A>e<EFBFBD>h<EFBFBD>h<EFBFBD>o<EFBFBD>o<EFBFBD>g<EFBFBD>w<EFBFBD>7<> 8<>8r)r
<00> Image.Imager <00>int<6E>returnrV)r
rVrXrV)rrVrrVrXrV)g<00>?r)
rrVrrVr8<00>floatr9rYrXrV)rrVrrVrOrYrXrV)rrVrrVrRrVrXrV)N)r
rVrTrWrUz
int | NonerXrV)<19>
__future__r<00>rr rrrr!r$r'r*r-r1r4r:r=r@rCrFrIrLrNrQr9<00>rr <00><module>r]s<00><01>$#<23><13>-<2D><18>
.<2E> :<3A> 9<> =<3D>;<3B>" 9<> =<3D> =<3D> :<3A>ST<01>E<01> <17>E<01>!,<2C>E<01>5:<3A>E<01>JO<4A>E<01><10>E<01>$ST<01>J<01> <17>J<01>!,<2C>J<01>5:<3A>J<01>JO<4A>J<01><10>J<01>"
=<3D>
B<01>6<>$ 5<> 6<>.<2E> 1<> <17> 1<>!,<2C> 1<>4?<3F> 1<><10> 1<>9r