
    h+                        S SK Jr  SSKJrJrJr   " S S5      r " S S\5      r " S S	\5      r " S
 S\5      r	 " S S\5      r
g)    )annotations   )ImageImageFilter	ImageStatc                  4    \ rS rSr% S\S'   S\S'   SS jrSrg)	_Enhance   Image.Imageimage
degeneratec                Z    [         R                  " U R                  U R                  U5      $ )au  
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     B/var/www/html/env/lib/python3.13/site-packages/PIL/ImageEnhance.pyenhance_Enhance.enhance   s     {{4??DJJ??     N)r   floatreturnr   )__name__
__module____qualname____firstlineno____annotations__r   __static_attributes__r   r   r   r	   r	      s    @r   r	   c                  "    \ rS rSrSrSS jrSrg)Color+   zAdjust 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                    Xl         SU l        SUR                  5       ;   a  SU l        U R                  UR                  :w  a4  UR	                  U R                  5      R	                  UR                  5      nXl        g )NLALA)r   intermediate_modegetbandsmodeconvertr   r   r   s     r   __init__Color.__init__4   s`    
!$%..""%)D"!!UZZ/MM$"8"89AA%**MEr   )r   r   r&   Nr   r   r   Noner   r   r   r   __doc__r+   r   r   r   r   r    r    +   s     r   r    c                  "    \ rS rSrSrSS jrSrg)Contrast?   zAdjust 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                h   Xl         UR                  S:w  a  UR                  S5      n[        [        R
                  " U5      R                  S   S-   5      n[        R                  " SUR                  U5      U l
        U R                  R                  U R                   R                  :w  a4  U R                  R                  U R                   R                  5      U l
        SU R                   R                  5       ;   a5  U R                  R                  U R                   R                  S5      5        g g )Nr#   r   g      ?r$   )r   r(   r)   intr   Statmeanr   newsizer   r'   putalpha
getchannel)r   r   r7   s      r   r+   Contrast.__init__G   s    
::MM#&E9>>%(--a0367))CT:??4::??2"oo55djjooFDO$**%%''OO$$TZZ%:%:3%?@ (r   r   r   Nr-   r/   r   r   r   r2   r2   ?   s    
Ar   r2   c                  "    \ rS rSrSrSS jrSrg)
BrightnessT   zAdjust 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                    Xl         [        R                  " UR                  UR                  S5      U l        SUR                  5       ;   a+  U R
                  R                  UR                  S5      5        g g )Nr   r$   )	r   r   r8   r(   r9   r   r'   r:   r;   r*   s     r   r+   Brightness.__init__\   sT    
))EJJ

A>%..""OO$$U%5%5c%:; #r   r=   Nr-   r/   r   r   r   r?   r?   T       <r   r?   c                  "    \ rS rSrSrSS jrSrg)	Sharpnessd   zAdjust 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                    Xl         UR                  [        R                  5      U l        SUR                  5       ;   a+  U R                  R                  UR                  S5      5        g g )Nr$   )r   filterr   SMOOTHr   r'   r:   r;   r*   s     r   r+   Sharpness.__init__l   sN    
,,{'9'9:%..""OO$$U%5%5c%:; #r   r=   Nr-   r/   r   r   r   rE   rE   d   rC   r   rE   N)
__future__r    r   r   r   r	   r    r2   r?   rE   r   r   r   <module>rM      sN   ( # + +@ @$ H  (Ax A*< < < <r   