B „.¦^Ÿć@s¾ddlmZdd„Zdd„Zdd„Zdd „Zd d „Zd d „Zdd„Zdd„Z dd„Z dd„Z dd„Z d/dd„Z d0dd„Zdd„Zd d!„Zd"d#„Zd$d%„Zd&d'„Zd(d)„Zd*d+„Zd1d-d.„Zd,S)2é)ŚImagecCst d|j|”S)zVFill a channel with a given grey level. :rtype: :py:class:`~PIL.Image.Image` ŚL)rŚnewŚsize)ŚimageŚvalue©rś2/tmp/pip-install-mwhup7aw/Pillow/PIL/ImageChops.pyŚconstantsr cCs| ”S)ziCopy a channel. Alias for :py:meth:`PIL.Image.Image.copy`. :rtype: :py:class:`~PIL.Image.Image` )Ścopy)rrrr Ś duplicatesr cCs| ”| |j ””S)z… Invert an image (channel). .. code-block:: python out = MAX - image :rtype: :py:class:`~PIL.Image.Image` )ŚloadŚ_newŚimZ chop_invert)rrrr Śinvert's rcCs$| ”| ”| |j |j””S)a Compares the two images, pixel by pixel, and returns a new image containing the lighter values. At least one of the images must have mode "1". .. code-block:: python out = max(image1, image2) :rtype: :py:class:`~PIL.Image.Image` )r rrZ chop_lighter)Śimage1Śimage2rrr Ślighter6s rcCs$| ”| ”| |j |j””S)a Compares the two images, pixel by pixel, and returns a new image containing the darker values. At least one of the images must have mode "1". .. code-block:: python out = min(image1, image2) :rtype: :py:class:`~PIL.Image.Image` )r rrZ chop_darker)rrrrr ŚdarkerGs rcCs$| ”| ”| |j |j””S)zś Returns the absolute value of the pixel-by-pixel difference between the two images. At least one of the images must have mode "1". .. code-block:: python out = abs(image1 - image2) :rtype: :py:class:`~PIL.Image.Image` )r rrZchop_difference)rrrrr Ś differenceXs rcCs$| ”| ”| |j |j””S)ai 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. At least one of the images must have mode "1". .. code-block:: python out = image1 * image2 / MAX :rtype: :py:class:`~PIL.Image.Image` )r rrZ chop_multiply)rrrrr ŚmultiplyisrcCs$| ”| ”| |j |j””S)zö Superimposes two inverted images on top of each other. At least one of the images must have mode "1". .. code-block:: python out = MAX - ((MAX - image1) * (MAX - image2) / MAX) :rtype: :py:class:`~PIL.Image.Image` )r rrZ chop_screen)rrrrr Śscreen}s rcCs$| ”| ”| |j |j””S)z Superimposes two images on top of each other using the Soft Light algorithm :rtype: :py:class:`~PIL.Image.Image` )r rrZchop_soft_light)rrrrr Ś soft_lightŽsrcCs$| ”| ”| |j |j””S)z Superimposes two images on top of each other using the Hard Light algorithm :rtype: :py:class:`~PIL.Image.Image` )r rrZchop_hard_light)rrrrr Ś hard_lightšsrcCs$| ”| ”| |j |j””S)z| Superimposes two images on top of each other using the Overlay algorithm :rtype: :py:class:`~PIL.Image.Image` )r rrZ chop_overlay)rrrrr Śoverlay¦srēš?écCs(| ”| ”| |j |j||””S)a5 Adds two images, dividing the result by scale and adding the offset. If omitted, scale defaults to 1.0, and offset to 0.0. At least one of the images must have mode "1". .. code-block:: python out = ((image1 + image2) / scale + offset) :rtype: :py:class:`~PIL.Image.Image` )r rrZchop_add)rrŚscaleŚoffsetrrr Śadd²s rcCs(| ”| ”| |j |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. At least one of the images must have mode "1". .. code-block:: python out = ((image1 - image2) / scale + offset) :rtype: :py:class:`~PIL.Image.Image` )r rrZ chop_subtract)rrrrrrr ŚsubtractÄs r cCs$| ”| ”| |j |j””S)zÓAdd two images, without clipping the result. At least one of the images must have mode "1". .. code-block:: python out = ((image1 + image2) % MAX) :rtype: :py:class:`~PIL.Image.Image` )r rrZchop_add_modulo)rrrrr Ś add_moduloÖs r!cCs$| ”| ”| |j |j””S)zŲSubtract two images, without clipping the result. At least one of the images must have mode "1". .. code-block:: python out = ((image1 - image2) % MAX) :rtype: :py:class:`~PIL.Image.Image` )r rrZchop_subtract_modulo)rrrrr Śsubtract_moduloęs r"cCs$| ”| ”| |j |j””S)zČLogical AND between two images. At least one of the images must have mode "1". .. code-block:: python out = ((image1 and image2) % MAX) :rtype: :py:class:`~PIL.Image.Image` )r rrZchop_and)rrrrr Ś logical_andös r#cCs$| ”| ”| |j |j””S)zĘLogical OR between two images. At least one of the images must have mode "1". .. code-block:: python out = ((image1 or image2) % MAX) :rtype: :py:class:`~PIL.Image.Image` )r rrZchop_or)rrrrr Ś logical_ors r$cCs$| ”| ”| |j |j””S)zÓLogical XOR between two images. At least one of the images must have mode "1". .. code-block:: python out = ((bool(image1) != bool(image2)) % MAX) :rtype: :py:class:`~PIL.Image.Image` )r rrZchop_xor)rrrrr Ś logical_xors r%cCst |||”S)zBlend images using constant transparency weight. Alias for :py:meth:`PIL.Image.Image.blend`. :rtype: :py:class:`~PIL.Image.Image` )rŚblend)rrŚalpharrr r&&sr&cCst |||”S)zŒCreate composite using transparency mask. Alias for :py:meth:`PIL.Image.Image.composite`. :rtype: :py:class:`~PIL.Image.Image` )rŚ composite)rrŚmaskrrr r(0sr(NcCs(|dkr |}| ”| |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 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 rrr)rZxoffsetZyoffsetrrr r:s r)rr)rr)N)Śrr r rrrrrrrrrrr r!r"r#r$r%r&r(rrrrr Śs*