Skip to content

daft.functions.resize#

resize #

resize(image: Expression, w: int, h: int) -> Expression

Resize image into the provided width and height.

Parameters:

Name Type Description Default
image Image Expression

expression to resize.

required
w int

Desired width of the resized image.

required
h int

Desired height of the resized image.

required

Returns:

Name Type Description
Expression Image Expression

An expression representing an image column of the resized images.

Source code in daft/functions/image.py
12
13
14
15
16
17
18
19
20
21
22
23
def resize(image: Expression, w: int, h: int) -> Expression:
    """Resize image into the provided width and height.

    Args:
        image (Image Expression): expression to resize.
        w (int): Desired width of the resized image.
        h (int): Desired height of the resized image.

    Returns:
        Expression (Image Expression): An expression representing an image column of the resized images.
    """
    return Expression._call_builtin_scalar_fn("image_resize", image, w=w, h=h)