pyflink.multimodal.operators.image_resize#
- image_resize(*columns, width, height, method='lanczos', concurrency=None)[source]#
Resize an image to fixed output dimensions.
- Parameters
*columns – Optional image columns. When provided, the UDF is applied directly instead of returning a factory.
width – Output width in pixels (positive integer).
height – Output height in pixels (positive integer).
method – Resize interpolation method —
"lanczos"(default),"bilinear","bicubic", or"nearest". Accepted case-insensitively and normalized to lowercase.concurrency – UDF concurrency.
Noneuses the framework default.
- Returns
A UDF producing decoded image values.
- Example::
>>> # As a reusable variable >>> resize = image_resize(width=512, height=512) >>> df = df.with_columns("resized", resize(col("img"))) >>> >>> # Inline >>> df = df.with_columns("resized", image_resize(col("img"), width=512, height=512))