HEX
Server: Apache
System: Linux srv1.prosuiteplus.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: prosuiteplus (1001)
PHP: 8.3.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/PIL/__pycache__/ImageEnhance.cpython-38.pyc
U

g�
^v�@sfddlmZmZmZGdd�d�ZGdd�de�ZGdd�de�ZGdd	�d	e�ZGd
d�de�ZdS)
�)�Image�ImageFilter�	ImageStatc@seZdZdd�ZdS)�_EnhancecCst�|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`
        )rZblend�
degenerate�image)�selfZfactor�r	�2/usr/lib/python3/dist-packages/PIL/ImageEnhance.py�enhancesz_Enhance.enhanceN)�__name__�
__module__�__qualname__rr	r	r	r
rsrc@seZdZdZdd�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.
    cCs8||_d|_d|��krd|_|�|j��|j�|_dS)N�L�AZLA)rZintermediate_mode�getbands�convert�moder�rrr	r	r
�__init__0s
zColor.__init__N�rr
r�__doc__rr	r	r	r
r'src@seZdZdZdd�ZdS)�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 grey image. A factor of 1.0 gives the original image.
    cCs`||_tt�|�d��jdd�}t�d|j|��|j	�|_
d|��kr\|j
�|�
d��dS)Nr�g�?r)r�intrZStatr�meanr�new�sizerrr�putalpha�
getchannel)rrrr	r	r
rAs
zContrast.__init__Nrr	r	r	r
r9src@seZdZdZdd�ZdS)�
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.
    cCs<||_t�|j|jd�|_d|��kr8|j�|�d��dS)Nrr)	rrrrrrrrr rr	r	r
rRszBrightness.__init__Nrr	r	r	r
r!Jsr!c@seZdZdZdd�ZdS)�	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.
    cCs6||_|�tj�|_d|��kr2|j�|�d��dS)Nr)r�filterrZSMOOTHrrrr rr	r	r
rbszSharpness.__init__Nrr	r	r	r
r"Zsr"N)	�rrrrrrr!r"r	r	r	r
�<module>s