# Check if the file is an image
if file_name.lower().endswith(('.png', '.jpg', '.jpeg', '.bmp', '.gif')):
input_path = os.path.join(root, file_name)
# Check if the file is an image
if file_name.lower().endswith(('.png', '.jpg', '.jpeg', '.bmp', '.gif')):
input_path = os.path.join(root, file_name)