Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/site-packages/PIL/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/site-packages/PIL/__pycache__/ImageEnhance.cpython-312.pyc

�

&ٜg+���ddlmZddlmZmZmZGd�d�ZGd�de�ZGd�d	e�ZGd
�de�Z	Gd�d
e�Z
y)�)�annotations�)�Image�ImageFilter�	ImageStatc�*�eZdZUded<ded<dd�Zy)�_Enhance�Image.Image�image�
degeneratec�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�blendrr)�self�factors  �;/usr/local/lib/python3.12/site-packages/PIL/ImageEnhance.py�enhancez_Enhance.enhances���{�{�4�?�?�D�J�J��?�?�N)r�float�returnr
)�__name__�
__module__�__qualname__�__annotations__r�rrr	r	s������@rr	c��eZdZdZdd�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|jk7r4|j	|j�j	|j�}||_y)N�L�A�LA)r�intermediate_mode�getbands�mode�convertr�rrs  r�__init__zColor.__init__4sd����
�!$����%�.�.�"�"�%)�D�"��!�!�U�Z�Z�/��M�M�$�"8�"8�9�A�A�%�*�*�M�E���rN�rr
r�None�rrr�__doc__r&rrrrr+s��� rrc��eZdZdZdd�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�^�||_|jdk7r|jd�}tt	j
|�jddz�}tjd|j|�|_
|jj|jjk7r4|jj|jj�|_
d|jj�vr5|jj|jjd��yy)Nrrg�?r)rr#r$�intr�Stat�meanr�new�sizerr"�putalpha�
getchannel)rrr0s   rr&zContrast.__init__Gs�����
��:�:����M�M�#�&�E��9�>�>�%�(�-�-�a�0�3�6�7���)�)�C����T�:����?�?���4�:�:�?�?�2�"�o�o�5�5�d�j�j�o�o�F�D�O��$�*�*�%�%�'�'��O�O�$�$�T�Z�Z�%:�%:�3�%?�@�(rNr'r)rrrr,r,?s
���
Arr,c��eZdZdZdd�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)	rrr1r#r2rr"r3r4r%s  rr&zBrightness.__init__\sV����
��)�)�E�J�J��
�
�A�>����%�.�.�"�"��O�O�$�$�U�%5�%5�c�%:�;�#rNr'r)rrrr6r6T����<rr6c��eZdZdZdd�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r"r3r4r%s  rr&zSharpness.__init__lsP����
��,�,�{�'9�'9�:����%�.�.�"�"��O�O�$�$�U�%5�%5�c�%:�;�#rNr'r)rrrr:r:dr8rr:N)�
__future__r�rrrr	rr,r6r:rrr�<module>r@sN��(#�+�+�@�@�$ �H� �(A�x�A�*
<��
<� 
<��
<r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists