Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
ImageEnhance.cpython-313.pyc50 linesDownload Raw Back to __pycache__
1�

2v�j����SSKJr SSKJrJrJr "SS5r"SS\5r"SS	\5r"S3S\5r	"SS
\5r4g)�)�annotations�)�Image�ImageFilter�	ImageStatc�4�\rSrSr%S\S'S\S'SSjrSrg)	�_Enhance��Image.Image�image�5degeneratec�Z�[R"URURU5$)au6Returns an enhanced image.7 8:param factor: A floating point value controlling the enhancement.9               Factor 1.0 always returns a copy of the original image,10               lower factors mean less color (brightness, contrast,11               etc), and higher values more. There are no restrictions12               on this value.13:rtype: :py:class:`~PIL.Image.Image`14)r�blendr
r)�self�factors  �VD:\code\apps\devtools\python\user_packages\Python313\site-packages\PIL/ImageEnhance.py�enhance�_Enhance.enhances���{�{�4�?�?�D�J�J��?�?��N)r�float�returnr)�__name__�15__module__�__qualname__�__firstlineno__�__annotations__r�__static_attributes__rrrr	r	s������@rr	c�"�\rSrSrSrSSjrSrg)�Color�+z�Adjust image color balance.16 17This class can be used to adjust the colour balance of an image, in18a manner similar to the controls on a colour TV set. An enhancement19factor of 0.0 gives a black and white image. A factor of 1.0 gives20the original image.21c���XlSUlSUR5;aSUlURUR:wa4UR	UR5R	UR5nXlg)N�L�A�LA)r�intermediate_mode�getbands�mode�convertr
�rrs  r�__init__�Color.__init__4s`���22�!$����%�.�.�"�"�%)�D�"��!�!�U�Z�Z�/��M�M�$�"8�"8�9�A�A�%�*�*�M�E��r)r
rr&N�rrr�None�rrrr�__doc__r+rrrrr r +s��� rr c�"�\rSrSrSrSSjrSrg)�Contrast�?z�Adjust image contrast.23 24This class can be used to control the contrast of an image, similar25to the contrast control on a TV set. An enhancement factor of 0.026gives a solid gray image. A factor of 1.0 gives the original image.27c�h�XlURS:waURS5n[[R28"U5RSS-5n[R"SURU5Ul29URRURR:wa4URRURR5Ul30SURR5;a5URRURRS55 gg)Nr#rg�?r$)rr(r)�intr�Stat�meanr�new�sizer
r'�putalpha�31getchannel)rrr7s   rr+�Contrast.__init__Gs����32��:�:����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�%?�@�(r�r
rNr-r/rrrr2r2?s
���33Arr2c�"�\rSrSrSrSSjrSrg)�34Brightness�Tz�Adjust image brightness.35 36This class can be used to control the brightness of an image.  An37enhancement factor of 0.0 gives a black image. A factor of 1.0 gives the38original image.39c���Xl[R"URURS5UlSUR
5;a+UR40RURS55 gg)Nrr$)	rrr8r(r9r
r'r:r;r*s  rr+�Brightness.__init__\sT���41��)�)�E�J�J��42�43�A�>����%�.�.�"�"��O�O�$�$�U�%5�%5�c�%:�;�#rr=Nr-r/rrrr?r?T����<rr?c�"�\rSrSrSrSSjrSrg)�	Sharpness�dz�Adjust image sharpness.44 45This class can be used to adjust the sharpness of an image. An46enhancement factor of 0.0 gives a blurred image, a factor of 1.0 gives the47original image, and a factor of 2.0 gives a sharpened image.48c���XlUR[R5UlSUR5;a+URR
URS55 gg)Nr$)r�filterr�SMOOTHr
r'r:r;r*s  rr+�Sharpness.__init__lsN���49��,�,�{�'9�'9�:����%�.�.�"�"��O�O�$�$�U�%5�%5�c�%:�;�#rr=Nr-r/rrrrErEdrCrrEN)�50__future__r�rrrr	r r2r?rErrr�<module>rMsN��(#�+�+�@�@�$ �H� �(A�x�A�*
<��
<� 
<��
<r
codekingpro/portable-devtools · Team Ai