Ctrl+K
Logo image Logo image

Site Navigation

  • API Reference
  • Examples

Site Navigation

  • API Reference
  • Examples

Section Navigation

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

pyflink.multimodal.codec.image_to_ndarray#

image_to_ndarray(image, mode=None)[source]#

Return decoded Image pixels as an ndarray for operator internals.

When mode is None, this returns the stored Image data unchanged, including its canonical 3-D (height, width, channels) shape. Callers may rely on this 3-D HWC shape; single-channel decoded images must not be collapsed to 2-D in the mode=None path. When a target mode is provided, Pillow handles color/channel conversion and the codec applies linear 8-bit/16-bit scaling. Single-channel targets such as L and L16 are returned in Pillow’s 2-D array shape.

previous

pyflink.multimodal.codec.image_mode_channels

next

pyflink.multimodal.codec.ndarray_to_image

Show Source

Created using Sphinx 4.5.0.