vllm.multimodal.image ¶
ImageEmbeddingMediaIO ¶
Source code in vllm/multimodal/image.py
ImageMediaIO ¶
Source code in vllm/multimodal/image.py
__init__ ¶
__init__(image_mode: str = 'RGB', **kwargs) -> None
Source code in vllm/multimodal/image.py
_convert_image_mode ¶
Convert image mode with custom background color.
Source code in vllm/multimodal/image.py
encode_base64 ¶
Source code in vllm/multimodal/image.py
load_base64 ¶
load_bytes ¶
convert_image_mode ¶
rescale_image_size ¶
Rescale the dimensions of an image by a constant factor.
Source code in vllm/multimodal/image.py
rgba_to_rgb ¶
rgba_to_rgb(
image: Image,
background_color: tuple[int, int, int] | list[int] = (
255,
255,
255,
),
) -> Image
Convert an RGBA image to RGB with filled background color.