pyflink.multimodal.codec.pil_to_image#
- pil_to_image(pil_image, mode=None)[source]#
Convert a PIL image to a decoded
Image.With
mode=None, directly representable Pillow modes are preserved. Other Pillow modes are converted to RGB/RGBA using Pillow’s own conversion rules, which may perform color-space conversion. Explicit 8-bit/16-bit target conversions use the codec’s linear bit-depth scaling.