pyflink.multimodal.codec.image_array_to_pil_compatible#
- image_array_to_pil_compatible(pixel_array)[source]#
Convert ndarray pixels to a PIL Image, normalizing only when required.
Pillow cannot operate directly on high-precision multichannel arrays. This helper preserves natively supported modes and falls back to the uint8 mode with the same channel count for PIL-only transforms.