Documentation
¶
Overview ¶
Package imageio loads a local image (or validates a data URI) into a data:image/...;base64,... URI for the multimodal vision path. It NEVER fetches a remote URL — only local files and pre-built data URIs are accepted.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadImageB64 ¶
LoadImageB64 returns a data:image/<type>;base64,<...> URI for pathOrDataURI.
- If the arg is already a data: URI, it is validated to be an image/* base64 URI and returned unchanged (rejected otherwise).
- If it looks like an http(s) URL, it is rejected — remote fetches are never allowed.
- Otherwise it is treated as a local file path: read (rejected if larger than maxBytes), type-sniffed from magic bytes (PNG/JPEG/WebP/GIF), and base64-encoded into a data URI. An unknown type is rejected.
maxBytes <= 0 means "no size limit" (the file is read whatever its size).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.