)EjddlmZddlmZmZmZGddZGddeZGdd eZGd d eZ Gd d eZ dS)) annotations)Image ImageFilter ImageStatc,eZdZUded<ded<d dZdS) _Enhance Image.Imageimage degeneratefactorfloatreturncBtj|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` )rblendr r )selfr s BC:\PYTHON\MyICR_Suite\python\Lib\site-packages\PIL/ImageEnhance.pyenhancez_Enhance.enhances{4?DJ???N)r rrr )__name__ __module__ __qualname____annotations__rrrr r sH @ @ @ @ @ @rr ceZdZdZddZdS) 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 r rNonec||_d|_d|vrd|_|j|jkr2||j|j}||_dS)NLALA)r intermediate_modegetbandsmodeconvertr rr s r__init__zColor.__init__4sm !$ %.."" " "%)D "  !UZ / /MM$"899AA%*MMErNr r rrrrr__doc__r'rrrrr+s2      rrceZdZdZddZdS) ContrastzAdjust 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 r rrc||_|jdkr|d}tt j|jddz}tjd|j ||_ |j j|jjkr)|j |jj|_ d|j vr4|j |j ddSdS)Nrrg?r )r r$r%intrStatmeanrnewsizer r#putalpha getchannel)rr r0s rr'zContrast.__init__Gs :  MM#&&E9>%((-a03677)CT:: ? 4:? 2 2"o55djoFFDO $*%%'' ' ' O $ $TZ%:%:3%?%? @ @ @ @ @ ( 'rNr(r)rrrr,r,?s8 A A A A A Arr,ceZdZdZddZdS) BrightnesszAdjust 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 r rrc||_tj|j|jd|_d|vr/|j|ddSdS)Nrr ) r rr1r$r2r r#r3r4r&s rr'zBrightness.__init__\si )EJ A>> %.."" " " O $ $U%5%5c%:%: ; ; ; ; ; # "rNr(r)rrrr6r6T2<<<<<r@s!(#"""""++++++++++@@@@@@@@$     H   (AAAAAxAAA* < < < < < < < < < < < < < < < < <