Skip to content

ImageU8

Summary

Grayscale 8-bit image (H x W).

Methods

fill

Signature: fill(value: int) -> None

Fill image with constant value.

get_height

Signature: get_height() -> int

Return image height.

get_size

Signature: get_size() -> ImageSize

Return image size as ImageSize.

get_width

Signature: get_width() -> int

Return image width.

load_from_disk

Signature: load_from_disk(file_path: str) -> bool

Load image from disk.

resize

Signature: resize(size: ImageSize) -> None

Resize image.

save_to_disk

Signature: save_to_disk(file_path: str) -> bool

Save image to disk.

to_numpy

Signature: to_numpy() -> numpy.ndarray[dtype=uint8, order='C']

Return a NumPy copy of the image.