from PIL import Image





def 		__lowerCamelCase							(UpperCAmelCase__       :							Optional[Any] ,	UpperCAmelCase__       :							Tuple					):
     SCREAMING_SNAKE_CASE           =    (2_5_9 * (level + 2_5_5)) / (2_5_5 * (2_5_9 - level))

     def contrast(UpperCAmelCase__       :							Tuple					) -> int:
          return int(1_2_8 + factor * (c - 1_2_8)					)

     return img.point(lowercase_					)


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





def 		__lowerCamelCase							(UpperCAmelCase__       :							int ,	UpperCAmelCase__       :							int					):
					while b:
										SCREAMING_SNAKE_CASE     ,				SCREAMING_SNAKE_CASE           =    b, a % b
					return a





def 		__lowerCamelCase							(UpperCAmelCase__       :							int ,	UpperCAmelCase__       :							int					):
					return a if b == 0 else euclidean_gcd_recursive(UpperCAmelCase__ ,	a % b					)





def 		__lowerCamelCase							():
					print(F"euclidean_gcd(3, 5) = {euclidean_gcd(3 ,	5					)}"					)
					print(F"euclidean_gcd(5, 3) = {euclidean_gcd(5 ,	3					)}"					)
					print(F"euclidean_gcd(1, 3) = {euclidean_gcd(1 ,	3					)}"					)
					print(F"euclidean_gcd(3, 6) = {euclidean_gcd(3 ,	6					)}"					)
					print(F"euclidean_gcd(6, 3) = {euclidean_gcd(6 ,	3					)}"					)

					print(F"euclidean_gcd_recursive(3, 5) = {euclidean_gcd_recursive(3 ,	5					)}"					)
					print(F"euclidean_gcd_recursive(5, 3) = {euclidean_gcd_recursive(5 ,	3					)}"					)
					print(F"euclidean_gcd_recursive(1, 3) = {euclidean_gcd_recursive(1 ,	3					)}"					)
					print(F"euclidean_gcd_recursive(3, 6) = {euclidean_gcd_recursive(3 ,	6					)}"					)
					print(F"euclidean_gcd_recursive(6, 3) = {euclidean_gcd_recursive(6 ,	3					)}"					)


if __name__ == "__main__":
							main()




