Expand description
Image processing utilities
Re-exports and high-level wrappers for image processing.
Structs§
- Image
Data - 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
- read_
image_ file - Reads an image file from the local filesystem and converts it to base64 format
- read_
image_ file_ any_ path - Reads an image file from an absolute path (or already validated path) and converts it to base64.
- read_
image_ from_ url - Reads an image from a URL and converts it to base64 format