


from PIL import Image





def 						_lowerCAmelCase							(     _lowerCAmelCase   ,						_lowerCAmelCase			)    ->						Image:


						'''simple docstring'''






						__snake_case				=		(259 * (level + 255)) / (255 * (259 - level))

						def contrast(_lowerCAmelCase			) -> int:
												return int(128 + factor * (c - 128)			)

						return img.point(_lowerCAmelCase			)


if __name__ == "__main__":
	# Load image
	with Image.open('image_data/lena.jpg') as img:
		# Change contrast to 170
		A				:       List[Any]      =  change_contrast(img, 170)
		cont_img.save('image_data/lena_high_contrast.png', format='png')









from __future__ import annotations





def 						_lowerCAmelCase							(     _lowerCAmelCase			)    ->						list[int]:


						'''simple docstring'''






						__snake_case				=		2
						__snake_case				=		[]
						while i * i <= n:
												if n % i:
																		i += 1
												else:
																		n //= i
																		factors.append(_lowerCAmelCase			)
						if n > 1:
												factors.append(_lowerCAmelCase			)
						return factors


if __name__ == "__main__":
	import doctest

	doctest.testmod()





