
'''simple docstring'''







import warnings

from ...utils import logging
from .image_processing_owlvit import OwlViTImageProcessor


_lowercase			:  Dict   							=	logging.get_logger(__name__)






class 			lowerCAmelCase__       (  _lowerCAmelCase					):






					def __init__(       self    ,							*__SCREAMING_SNAKE_CASE    ,							**__SCREAMING_SNAKE_CASE		):


											"""simple docstring"""





											warnings.warn(
											    '''The class OwlViTFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please'''
											    ''' use OwlViTImageProcessor instead.'''    ,							SCREAMING_SNAKE_CASE_    ,							)
											super().__init__(*SCREAMING_SNAKE_CASE_    ,							**SCREAMING_SNAKE_CASE_		)





'''simple docstring'''







from PIL import Image
def  snake_case_		(    __SCREAMING_SNAKE_CASE :			Image				,				__SCREAMING_SNAKE_CASE :			int							):



						"""simple docstring"""





						lowercase_     :					Optional[int]													=	(259 * (level + 255)) / (255 * (259 - level))

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

						return img.point(__SCREAMING_SNAKE_CASE							)


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



