extract_previews
Extract auto-rotated JPEG previews from raw files (NEF/CR2/ARW/DNG) to enable vision-based rating. Generates standard and thumbnail images with EXIF metadata, preserving directory structure.
Instructions
Extract auto-rotated JPEG previews from a directory of raw files (NEF/CR2/ARW/DNG/etc) for vision-based rating. Each preview is rotated upright via EXIF orientation and resized to max_dim (default 1024). A smaller thumb_dim (default 384) is also written for token-efficient first-pass culling. Returns a list of items with preview paths plus an EXIF summary (ISO, shutter, focal, aperture, datetime) per file. The scan is recursive, and the output tree mirrors the source tree, so raws with the same filename in different subdirectories get distinct previews. Read the preview path from each item rather than assuming /.jpg.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_dim | No | Longest-edge for the standard preview | |
| overwrite | No | Re-extract even if preview exists | |
| thumb_dim | No | Thumb longest-edge; 0 to skip | |
| output_dir | No | Where to write JPEGs. Default: <source_dir>/.previews/ | |
| source_dir | Yes | Directory containing raw files | |
| max_workers | No | Parallel decode workers. Default: min(8, cpu_count). Lower it if the machine is memory-constrained. |