%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/PIL/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/PIL/__pycache__/ImageEnhance.cpython-312.pyc

�

��e����ddlmZddlmZmZmZGd�d�ZGd�de�ZGd�d	e�ZGd
�de�Z	Gd�d
e�Z
y)�)�annotations�)�Image�ImageFilter�	ImageStatc��eZdZd�Zy)�_Enhancec�X�tj|j|j|�S)a�
        Returns an enhanced image.

        :param factor: A floating point value controlling the enhancement.
                       Factor 1.0 always returns a copy of the original image,
                       lower factors mean less color (brightness, contrast,
                       etc), and higher values more. There are no restrictions
                       on this value.
        :rtype: :py:class:`~PIL.Image.Image`
        )r�blend�
degenerate�image)�self�factors  �2/usr/lib/python3/dist-packages/PIL/ImageEnhance.py�enhancez_Enhance.enhances���{�{�4�?�?�D�J�J��?�?�N)�__name__�
__module__�__qualname__r�rrr	r	s��@rr	c��eZdZdZd�Zy)�ColoraAdjust image color balance.

    This class can be used to adjust the colour balance of an image, in
    a manner similar to the controls on a colour TV set. An enhancement
    factor of 0.0 gives a black and white image. A factor of 1.0 gives
    the original image.
    c���||_d|_d|j�vrd|_|j|j�j|j�|_y)N�L�A�LA)r
�intermediate_mode�getbands�convert�moder�rr
s  r�__init__zColor.__init__1sM����
�!$����%�.�.�"�"�%)�D�"��-�-��(>�(>�?�G�G��
�
�S��rN�rrr�__doc__r"rrrrr(s
���Trrc��eZdZdZd�Zy)�Contrastz�Adjust image contrast.

    This class can be used to control the contrast of an image, similar
    to the contrast control on a TV set. An enhancement factor of 0.0
    gives a solid gray image. A factor of 1.0 gives the original image.
    c��||_ttj|j	d��j
ddz�}t
jd|j|�j	|j�|_
d|j�vr+|jj|jd��yy)Nrrg�?r)r
�intr�Statr�meanr�new�sizer rr�putalpha�
getchannel)rr
r*s   rr"zContrast.__init__Bs�����
��9�>�>�%�-�-��"4�5�:�:�1�=��C�D���)�)�C����T�:�B�B�5�:�:�N����%�.�.�"�"��O�O�$�$�U�%5�%5�c�%:�;�#rNr#rrrr&r&:s���<rr&c��eZdZdZd�Zy)�
Brightnessz�Adjust image brightness.

    This class can be used to control the brightness of an image.  An
    enhancement factor of 0.0 gives a black image. A factor of 1.0 gives the
    original image.
    c���||_tj|j|jd�|_d|j
�vr+|j
j|jd��yy)Nrr)	r
rr+r r,rrr-r.r!s  rr"zBrightness.__init__SsV����
��)�)�E�J�J��
�
�A�>����%�.�.�"�"��O�O�$�$�U�%5�%5�c�%:�;�#rNr#rrrr0r0K����<rr0c��eZdZdZd�Zy)�	Sharpnessz�Adjust image sharpness.

    This class can be used to adjust the sharpness of an image. An
    enhancement factor of 0.0 gives a blurred image, a factor of 1.0 gives the
    original image, and a factor of 2.0 gives a sharpened image.
    c���||_|jtj�|_d|j�vr+|jj
|jd��yy)Nr)r
�filterr�SMOOTHrrr-r.r!s  rr"zSharpness.__init__csP����
��,�,�{�'9�'9�:����%�.�.�"�"��O�O�$�$�U�%5�%5�c�%:�;�#rNr#rrrr4r4[r2rr4N)�
__future__r�rrrr	rr&r0r4rrr�<module>r:sN��(#�+�+�@�@�T�H�T�$<�x�<�"
<��
<� 
<��
<r

Zerion Mini Shell 1.0