Sprig Fit Images
v0.1.2Inspect local photos and crop, resize or compress images to exact dimensions and file-size limits.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
inspect_image Inspect image
Read a local static JPEG/PNG/WebP image. Return EXIF-oriented width/height, actual bytes, MIME type and transparency, without exposing source EXIF. Optionally attach a small JPEG preview for crop planning.
| Parameter | Type | Description |
|---|---|---|
source * | object | |
include_preview | boolean | Attach a small JPEG preview for visual crop planning; the original is never embedded. |
prepare_image Prepare image
Crop, resize, convert and compress one local image. Keep the full original when size/crop are omitted. Percent crop coordinates refer to the EXIF-oriented original; fitting happens after extraction. Exact max_bytes includes metadata. Default conflict_policy=error never silently reduces requested dimensions. JPEG transparency/letterboxing requires an explicit background. Save a NEW local file and return its actual dimensions, bytes and file resource. No image uploads or external service calls.
| Parameter | Type | Description |
|---|---|---|
format * | string | |
source * | object | |
allow_upscale | boolean | |
anchor | string | |
background | string | Explicit opaque background for JPEG transparency or letterboxing. |
conflict_policy | string | error preserves requested dimensions; shrink permits proportional downscaling to meet max_bytes. |
crop | object | Percentages (0–100) of the EXIF-oriented original; extraction happens before fitting. |
fit | string | |
max_bytes | integer | Maximum actual output bytes including density metadata; 1 KB = 1000 bytes. |
size | object | Omit to keep original/cropped dimensions. One dimension derives the other proportionally. Inch values are multiplied by PPI and rounded. |