vllm.multimodal.image ¶
Functions:
-
normalize_image–Normalize EXIF orientation so the pixel data matches visual display.
-
rescale_image_size–Rescale the dimensions of an image by a constant factor.
-
rgba_to_rgb–Convert an RGBA image to RGB with filled background color.
_has_transparency(image) ¶
Detect whether an image carries transparency data (RGBA, LA, PA, or tRNS chunk in P/L/RGB PNGs).
Source code in vllm/multimodal/image.py
normalize_image(image) ¶
Normalize EXIF orientation so the pixel data matches visual display.
rescale_image_size(image, size_factor, transpose=-1) ¶
Rescale the dimensions of an image by a constant factor.
Source code in vllm/multimodal/image.py
rgba_to_rgb(image, background_color=(255, 255, 255)) ¶
Convert an RGBA image to RGB with filled background color.