

"""simple docstring"""






import numpy as np
from cva import destroyAllWindows, imread, imshow, waitKey







class       snake_case__  :







			def __init__(			self			: Tuple			,  lowercase			: List[str]			,  lowercase			: List[str]			,  lowercase			: Tuple  ):





								'''simple docstring'''



								if dst_width < 0 or dst_height < 0:
													raise ValueError("Destination width/height should be > 0"  )

								UpperCAmelCase			:   List[str]      =				img
								UpperCAmelCase			:   str      =				img.shape[1]
								UpperCAmelCase			:   Tuple      =				img.shape[0]
								UpperCAmelCase			:   Union[str, Any]      =				dst_width
								UpperCAmelCase			:   str      =				dst_height

								UpperCAmelCase			:   str      =				self.src_w / self.dst_w
								UpperCAmelCase			:   List[Any]      =				self.src_h / self.dst_h

								UpperCAmelCase			:   str      =				(
								    np.ones((self.dst_h, self.dst_w, 3)			,  np.uinta  ) * 2_55
								)







			def 			__lowerCAmelCase				(			self			: Optional[Any]  ):





								'''simple docstring'''



								for i in range(self.dst_h  ):
													for j in range(self.dst_w  ):
																		UpperCAmelCase			:   Optional[int]      =				self.img[self.get_y(lowercase_  )][self.get_x(lowercase_  )]







			def 			__lowerCAmelCase				(			self			: str			,  lowercase			: Optional[Any]  ):





								'''simple docstring'''



								return int(self.ratio_x * x  )







			def 			__lowerCAmelCase				(			self			: int			,  lowercase			: List[str]  ):





								'''simple docstring'''



								return int(self.ratio_y * y  )


if __name__ == "__main__":
	snake_case_     ,      snake_case_   :   Optional[Any]        =       8_0_0, 6_0_0
	snake_case_   :   Any        =       imread("""image_data/lena.jpg""", 1)
	snake_case_   :   Dict        =       NearestNeighbour(im, dst_w, dst_h)
	n.process()

	imshow(
	    f'''Image resized from: {im.shape[1]}x{im.shape[0]} to {dst_w}x{dst_h}''', n.output
	)
	waitKey(0)
	destroyAllWindows()





"""simple docstring"""






snake_case_   :   str        =       [
    """DownloadConfig""",
    """DownloadManager""",
    """DownloadMode""",
    """StreamingDownloadManager""",
]

from .download_config import DownloadConfig
from .download_manager import DownloadManager, DownloadMode
from .streaming_download_manager import StreamingDownloadManager


