ImageContainer.uncrop

ImageContainer.uncrop#

classmethod ImageContainer.uncrop(crops, shape=None)[source]#

Re-assemble image from crops and their positions.

Fills remaining positions with zeros.

Parameters:
crops list[ImageContainer]

List of image crops.

shape tuple[int, int] | None (default: None)

Requested image shape as (height, width). If None, it is automatically determined from crops.

Returns:

ImageContainer – Re-assembled image from crops.

Raises:

ValueError – If crop metadata was not found or if the requested shape is smaller than required by crops.