zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
U
T±dÝ ã@sfddlmZmZmZGdd„dƒZGdd„deƒZGdd„deƒZGdd    „d    eƒZGd
d „d eƒ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    úGd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\PIL/ImageEnhance.pyÚenhances z_Enhance.enhanceN)Ú__name__Ú
__module__Ú __qualname__r r    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