# This file is automatically generated by pyo3_stub_gen
# ruff: noqa: E501, F401, F403, F405

import numpy
import numpy.typing
__all__ = [
    "compute_auto_levels",
    "normalize_grayscale",
]

def compute_auto_levels(gray_image: numpy.typing.NDArray[numpy.uint8], clip_percent: float = 1) -> tuple[int, int]:
    r"""
    Compute auto black/white levels from a grayscale image histogram.
    
    :param gray_image: Grayscale image as uint8 array.
    :param clip_percent: Percentage of pixels to clip from each end.
    :returns: Tuple of (black_point, white_point).
    :complexity: O(n) where n = number of pixels
    """

def normalize_grayscale(gray_image: numpy.typing.NDArray[numpy.uint8], black_point: int = 0, white_point: int = 255) -> numpy.typing.NDArray[numpy.uint8]:
    r"""
    Normalize a grayscale image by stretching the dynamic range.
    
    :param gray_image: Input grayscale image as uint8 array.
    :param black_point: Black point for normalization.
    :param white_point: White point for normalization.
    :returns: Normalized grayscale image with the same shape.
    :raises ValueError: If black_point >= white_point.
    :complexity: O(n) where n = number of pixels
    """

