bim-image

Convert, resize, annotate, and compare images from the command line. Useful anywhere a pipeline produces or consumes image files — site visit photos from a phone, renderings from a visualization model, scanned drawings. Handles HEIC natively so your assistant doesn't have to ask you to convert first.

Image format conversion, metadata, annotation, and QA for AEC workflows. Handles site photos (HEIC), renderings (PNG/JPG), and drawing scans (TIFF).

Requirements

Vendored sidebinaries — verified by bim doctor --json:

Supported formats

Input: PNG, JPG, TIFF, WebP, BMP, HEIC, HEIF Output: PNG, JPG, TIFF, BMP (HEIC output not supported)

Verbs

VerbWhat it does
bim image info FILEDecode and report image metadata: format, dimensions, color model, EXIF presence
bim image convert --in FILE --out FILE [--format FORMAT] [--quality N]Convert an image between formats (PNG, JPG, TIFF, BMP; HEIC decode via vendored heif-convert)
bim image resize --in FILE --out FILE [--width N] [--height N] [--max-edge N] [--fit FIT] [--rotate N] [--auto-orient] [--quality N]Resize, rotate, or crop an image. auto-orient reads EXIF Orientation, rotates pixels, and strips the tag (requires exiftool; auto-installed if missing). Output includes a 'warn' field if the orientation strip succeeded on image but exiftool tag removal failed (non-fatal).
bim image exif.read --in FILEEmit AEC-relevant EXIF fields as JSON (GPS, datetime, make/model, orientation, dimensions)
bim image exif.strip --in FILE --out FILEWrite a metadata-free copy of the image to out. Output: output_file (path written) and tags_changed (-1 = all tags removed, exact count unavailable from exiftool batch API).
bim image exif.set --in FILE --out FILE --tag TAG --value VALUEWrite one EXIF tag to a new file (single-file mode; NDJSON batch stdin is v0.2)
bim image annotate --in FILE --out FILE --ops OPS [--quality N]Draw rectangles, lines, arrows, and text onto an image
bim image diff --a FILE --b FILE [--out FILE] [--threshold THRESHOLD] [--fail-over FAIL-OVER]Pixel-level comparison of two images. Both images must be the same dimensions. Output always includes pixels_total, pixels_diff, ratio_diff, and exceeds_limit. When fail-over is set and exceeded, exceeds_limit is true in the result (exit code is still 0; callers should check exceeds_limit).
bim image to-pdf --files FILE --out FILE [--page-size PAGE-SIZE] [--dpi N]Wrap one or more images as pages in a new PDF
bim image setup [--force]Download and install required dependencies (exiftool, ImageMagick) into vendor-bin/
bim image doctorDriver health check
bim image versionDriver version

annotate ops format

[
  {"type":"rect","x":100,"y":200,"width":300,"height":150,"color":"#ff0000","linewidth":2,"filled":false},
  {"type":"text","x":100,"y":195,"text":"revise","color":"#ff0000","size":18}
]

Supported types: rect, line, arrow, text. Pass "-" to --ops to read NDJSON from stdin.

For agent use: /image/llms.txt