


"""simple docstring"""
from PIL import Image






def 		lowercase							(     _snake_case						:      Optional[int]     ,   _snake_case						:      Tuple     )     ->Image:
	"""simple docstring"""





	def brightness(_snake_case						:      Optional[Any]     ) -> float:
		return 128 + level + (c - 128)

	if not -255.0 <= level <= 255.0:
		raise ValueError('''level must be between -255.0 (black) and 255.0 (white)'''     )
	return img.point(__a     )


if __name__ == "__main__":
			# Load image
			with Image.open("""image_data/lena.jpg""") as img:
						# Change brightness to 100
						SCREAMING_SNAKE_CASE :    str									=				change_brightness(img, 100)
						brigt_img.save("""image_data/lena_brightness.png""", format="""png""")









'''simple docstring'''
from PIL import Image


def 			a      (			__a ,					__a   )  ->	Image:



					'''simple docstring'''






					def brightness(__a   ) -> float:
										return 128 + level + (c - 128)

					if not -2_5_5.0 <= level <= 2_5_5.0:
										raise ValueError('''level must be between -255.0 (black) and 255.0 (white)'''   )
					return img.point(__a   )


if __name__ == "__main__":
		# Load image
		with Image.open('''image_data/lena.jpg''') as img:
				# Change brightness to 100
				__snake_case							      =     change_brightness(img, 100)
				brigt_img.save('''image_data/lena_brightness.png''', format='''png''')