Skip to content

Prepare Images

🤖 AI Drafted (Not reviewed)

Normalize images/PDF pages for OCR without modifying source files.

Tool id prepare_images
Category transform
Uses a language model no
Needs a generative model no
Runs over many items yes
Item handling batch
Structured output no
Human-verified not yet

What it reads

Port Type Required What it is
Files (files) files yes Image or PDF files to prepare.
Documents (documents) json no Document metadata for future preview-editor integration.

What it emits

Port Type Required What it is
Prepared Files (output_files) files Prepared image files.
Documents (documents) json Documents index-aligned with the prepared files (#4298).

Options

Option Type Default What it does
autocontrast boolean no Apply autocontrast to improve low-contrast scans.
compression_quality integer 85 JPEG/WebP compression quality.
grayscale boolean no Convert prepared images to grayscale for OCR.
output_dir string Optional output directory. Defaults to a temp directory.
output_format string jpg Prepared image format. One of: jpg, png, tiff, webp.
pdf_dpi integer 200 DPI used when rendering PDF pages.

The prompt it sends

This tool does not send a prompt — it does its work in code.