src/features/redact/file-policy.ts, rasterize.ts and safe-copy.ts.
Input
Prepared pages
Every page is rasterized to a PNG whose long edge is at most 2400 px. OCR boxes, marks and the saved copy all use these pixels. Each page is one request to the local service.Output
The uploaded file is never modified.
A single-page result can also be copied to the clipboard as PNG.