Overview

Requires ImageMagick (`convert`), exiftool, and tesseract on PATH. Scripts are Python 3.11+, run via `uv run`.

Recipes

Copy-paste command sequences agents can run via uv run.

Convert PNG to JPEG
uv run scripts/convert.py --input photo.png --format jpg
Resize for web (max width 1200, keep aspect)
uv run scripts/resize.py --input hero.png --width 1200
Crop a thumbnail from coordinates
uv run scripts/crop.py --input photo.jpg --width 400 --height 400 --x 100 --y 50
Rotate 90° clockwise
uv run scripts/rotate.py --input scan.png --degrees 90
Mirror horizontally
uv run scripts/flip.py --input photo.png --direction horizontal
Shrink file size for sharing
uv run scripts/optimize.py --input large.png
Read camera metadata before editing
uv run scripts/read_exif.py --input IMG_1234.jpg
Strip GPS and camera info before upload
uv run scripts/strip_metadata.py --input IMG_1234.jpg
OCR text from a screenshot
uv run scripts/ocr.py --input screenshot.png

Operations

Each script returns structured JSON — see the script contract.

Op IDScriptCommon flags
image.convertconvert.py--input
image.cropcrop.py--input
image.flipflip.py--input
image.ocrocr.py--input
image.optimizeoptimize.py--input
image.read_exifread_exif.py--input
image.resizeresize.py--input
image.rotaterotate.py--input
image.strip_metadatastrip_metadata.py--input

Do not use for

  • Video timeline edits (use `video-transformation`)
  • PDF or vector graphics
  • RAW/developed photo workflows (develop first, then `convert.py`)