daft.Expression.image.crop

daft.Expression.image.crop#

Expression.image.crop(bbox: tuple[int, int, int, int] | daft.expressions.expressions.Expression) Expression[source]#

Crops images with the provided bounding box

Parameters:

bbox (tuple[float, float, float, float] | Expression) – Either a tuple of (x, y, width, height) parameters for cropping, or a List Expression where each element is a length 4 List which represents the bounding box for the crop

Returns:

An Image expression representing the cropped image

Return type:

Expression