pub fn compress_for_llm(
image: &DynamicImage,
max_dim: u32,
quality: u8,
) -> Result<String>Expand description
Resize and JPEG-encode an image for LLM submission.
If the image’s longest side exceeds max_dim, it is resized proportionally.
The result is JPEG-encoded at quality (1–100) and base64-encoded.