o �J�h��@srddlmZddlmZmZmZGdd�d�ZGdd�de�ZGdd �d e�ZGd d �d e�Z Gd d �d e�Z dS)�)� annotations�)�Image� ImageFilter� ImageStatc@s(eZdZUded<ded<d dd�Zd S) �_Enhance� Image.Image�image� degenerate�factor�float�returncCst�|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 )�selfr �r�NC:\pinokio\api\whisper-webui.git\app\env\lib\site-packages\PIL\ImageEnhance.py�enhances z_Enhance.enhanceN)r r r r)�__name__� __module__� __qualname__�__annotations__rrrrrrs rc@�eZdZdZd dd�ZdS) �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. r rr �NonecCsH||_d|_d|��vrd|_|j|jkr|�|j��|j�}||_dS)N�L�A�LA)r Zintermediate_mode�getbands�mode�convertr �rr rrr�__init__4s   zColor.__init__N�r rr r�rrr�__doc__r!rrrrr+src@r) �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. r rr rcCs�||_|jdkr |�d�}tt�|�jdd�}t�d|j |�|_ |j j|jjkr3|j �|jj�|_ d|j� �vrF|j � |j� d��dSdS)Nrrg�?r)r rr�intr�Stat�meanr�new�sizer r�putalpha� getchannel)rr r(rrrr!Gs  �zContrast.__init__Nr"r#rrrrr%?�r%c@r) � 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. r rr rcCs@||_t�|j|jd�|_d|��vr|j�|�d��dSdS)Nrr) r rr)rr*r rr+r,r rrrr!\s  �zBrightness.__init__Nr"r#rrrrr.Tr-r.c@r) � 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. r rr rcCs:||_|�tj�|_d|��vr|j�|�d��dSdS)Nr)r �filterrZSMOOTHr rr+r,r rrrr!ls  �zSharpness.__init__Nr"r#rrrrr/dr-r/N) � __future__r�rrrrrr%r.r/rrrr�<module>s 
Memory