fix(ocr): adaptive dpi + size-aware batching for oversized scans

↗ view on GitHub · emileriksenkeev · 2026-07-14 · b61d3d10

~40 scanned permits/receipts failed OCR: high-res scans rasterised at
150 dpi produced PNGs over the API's 10 MB per-image cap, and six fat
pages in one request tripped the request-size ceiling (413). Re-rasterise
at 96/72 dpi when a page exceeds 4.5 MB, and cut batches by cumulative
bytes as well as page count.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Repository emileriksenkeev/sydOS
Author emileriksenkeev <emil@keev.co>
Authored
Parents ce3bdad2
Stats 1 file changed , +41 , -4
Part of Text extraction and OCR hardening

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-b61d3d10.md from inside the repo you want the change in.

⬇ Download capture-commit-b61d3d10.md