Skip to main content

Module image

Module image 

Source
Expand description

Image processing utilities

Structs§

ImageData
Represents the data from an image file ready for LLM consumption

Functions§

detect_mime_type_from_content_type
Detects MIME type from Content-Type header
detect_mime_type_from_data
Detects MIME type from file data (magic bytes)
detect_mime_type_from_extension
Detects the MIME type based on file extension
encode_to_base64
Encodes binary data to base64
has_supported_image_extension
Validates that the image file path has a supported extension