Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3
ia� ã @ s¾ d dl mZ dd„ Zdd„ Zdd„ Zdd „ Zd
d„ Zdd
„ Zdd„ Zdd„ Z dd„ Z
dd„ Zdd„ Zd/dd„Z
d0dd„Zdd„ Zd d!„ Zd"d#„ Zd$d%„ Zd&d'„ Zd(d)„ Zd*d+„ Zd1d-d.„Zd,S )2é )ÚImagec C s t jd| j|ƒS )zVFill a channel with a given grey level.
:rtype: :py:class:`~PIL.Image.Image`
ÚL)r ÚnewÚsize)ÚimageÚvalue© r ú//tmp/tmp5hum_rxs/lib64/python/PIL/ImageChops.pyÚconstant s r
c C s | j ƒ 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 ƒ | j| jjƒ ƒS )z…
Invert an image (channel).
.. code-block:: python
out = MAX - image
:rtype: :py:class:`~PIL.Image.Image`
)ÚloadÚ_newÚimZchop_invert)r r r r Úinvert' s r c C s$ | j ƒ |j ƒ | j| jj|jƒƒS )zÖ
Compares the two images, pixel by pixel, and returns a new image containing
the lighter values.
.. code-block:: python
out = max(image1, image2)
:rtype: :py:class:`~PIL.Image.Image`
)r
r r Zchop_lighter)Úimage1Úimage2r r r Úlighter6 s r c C s$ | j ƒ |j ƒ | j| jj|jƒƒS )zÕ
Compares the two images, pixel by pixel, and returns a new image containing
the darker values.
.. code-block:: python
out = min(image1, image2)
:rtype: :py:class:`~PIL.Image.Image`
)r
r r Zchop_darker)r r r r r ÚdarkerG s r c C s$ | j ƒ |j ƒ | j| jj|jƒƒS )zË
Returns the absolute value of the pixel-by-pixel difference between the two
images.
.. code-block:: python
out = abs(image1 - image2)
:rtype: :py:class:`~PIL.Image.Image`
)r
r r Zchop_difference)r r r r r Ú
differenceX s r c C s$ | j ƒ |j ƒ | j| jj|jƒƒS )a6
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.
.. code-block:: python
out = image1 * image2 / MAX
:rtype: :py:class:`~PIL.Image.Image`
)r
r r Z
chop_multiply)r r r r r Úmultiplyi s r c C s$ | j ƒ |j ƒ | j| jj|jƒƒS )zÃ
Superimposes two inverted images on top of each other.
.. code-block:: python
out = MAX - ((MAX - image1) * (MAX - image2) / MAX)
:rtype: :py:class:`~PIL.Image.Image`
)r
r r Zchop_screen)r r r r r Úscreen| s r c C s$ | 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`
)r
r r Zchop_soft_light)r r r r r Ú
soft_lightŒ s r c C s$ | 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`
)r
r r Zchop_hard_light)r r r r r Ú
hard_light˜ s r c C s$ | 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`
)r
r r Zchop_overlay)r r r r r Úoverlay¤ s r ç ð?é c C s( | j ƒ |j ƒ | j| jj|j||ƒƒS )a
Adds two images, dividing the result by scale and adding the
offset. If omitted, scale defaults to 1.0, and offset to 0.0.
.. code-block:: python
out = ((image1 + image2) / scale + offset)
:rtype: :py:class:`~PIL.Image.Image`
)r
r r Zchop_add)r r ÚscaleÚoffsetr r r Úadd° s r c C s( | j ƒ |j ƒ | j| jj|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.
.. code-block:: python
out = ((image1 - image2) / scale + offset)
:rtype: :py:class:`~PIL.Image.Image`
)r
r r Z
chop_subtract)r r r r r r r ÚsubtractÁ s r c C s$ | j ƒ |j ƒ | j| jj|jƒƒS )z Add two images, without clipping the result.
.. code-block:: python
out = ((image1 + image2) % MAX)
:rtype: :py:class:`~PIL.Image.Image`
)r
r r Zchop_add_modulo)r r r r r Ú
add_moduloÒ s
r! c C s$ | j ƒ |j ƒ | j| jj|jƒƒS )z¥Subtract two images, without clipping the result.
.. code-block:: python
out = ((image1 - image2) % MAX)
:rtype: :py:class:`~PIL.Image.Image`
)r
r r Zchop_subtract_modulo)r r r r r Úsubtract_moduloá s
r" c C s$ | j ƒ |j ƒ | j| jj|jƒƒS )aƒ 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.
.. code-block:: python
out = ((image1 and image2) % MAX)
:rtype: :py:class:`~PIL.Image.Image`
)r
r r Zchop_and)r r r r r Úlogical_andð s r# c C s$ | j ƒ |j ƒ | j| jj|jƒƒS )z¿Logical OR between two images.
Both of the images must have mode "1".
.. code-block:: python
out = ((image1 or image2) % MAX)
:rtype: :py:class:`~PIL.Image.Image`
)r
r r Zchop_or)r r r r r Ú
logical_or s r$ c C s$ | j ƒ |j ƒ | j| jj|jƒƒS )zÌLogical XOR between two images.
Both of the images must have mode "1".
.. code-block:: python
out = ((bool(image1) != bool(image2)) % MAX)
:rtype: :py:class:`~PIL.Image.Image`
)r
r r Zchop_xor)r r r r r Úlogical_xor s r% c C s t j| ||ƒS )z‰Blend images using constant transparency weight. Alias for
:py:func:`PIL.Image.blend`.
:rtype: :py:class:`~PIL.Image.Image`
)r Úblend)r r Úalphar r r r&