Ctrl+K
Logo image Logo image

Site Navigation

  • API Reference
  • Examples

Site Navigation

  • API Reference
  • Examples

Section Navigation

  • PyFlink Table
  • PyFlink DataFrame
  • PyFlink Multimodal
    • Image
    • Video
    • Utilities
  • PyFlink DataStream
  • PyFlink Common

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. None uses 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))

previous

pyflink.multimodal.operators.image_convert_mode

next

pyflink.multimodal.operators.image_rescale

Show Source

Created using Sphinx 4.5.0.