K i+ddlmZddlmZmZmZGddZGddeZGdd eZGd d eZ Gd d eZ y)) annotations)Image ImageFilter ImageStatc*eZdZUded<ded<ddZy)_Enhance Image.Imageimage degeneratecXtj|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 )selffactors V/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/PIL/ImageEnhance.pyenhancez_Enhance.enhances{{4??DJJ??N)rfloatreturnr )__name__ __module__ __qualname____annotations__rrrr r s  @rr ceZdZdZddZy)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. c||_d|_d|jvrd|_|j|jk7r4|j |jj |j}||_y)NLALA)r intermediate_modegetbandsmodeconvertr rr s r__init__zColor.__init__4sd !$ %.." "%)D "  ! !UZZ /MM$"8"89AA%**MErNr r rNonerrr__doc__r&rrrrr+s  rrceZdZdZddZy)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. c^||_|jdk7r|jd}tt j |j ddz}tjd|j||_ |jj|jjk7r4|jj|jj|_ d|jjvr5|jj|jjdyy)Nrrg?r)r r#r$intrStatmeanrnewsizer r"putalpha getchannel)rr r0s rr&zContrast.__init__Gs :: MM#&E9>>%(--a0367))CT: ??  4::?? 2"oo55djjooFDO $**%%' ' OO $ $TZZ%:%:3%? @ (rNr'r)rrrr,r,?s  Arr,ceZdZdZddZy) 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. c||_tj|j|jd|_d|j vr+|j j|jdyy)Nrr) r rr1r#r2r r"r3r4r%s rr&zBrightness.__init__\sV ))EJJ A> %.." " OO $ $U%5%5c%: ; #rNr'r)rrrr6r6T r@sN(#++@@$ H (AxA* < < <