Skip to content

Flatten Stains

🤖 AI Drafted (Not reviewed)

Even out stains and shadows by dividing the page by a closing of its lightness, without modifying source files.

Tool id stain_flatten_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 files to adjust.
Documents (documents) json no Document metadata for preview-editor edit-chain updates.

What it emits

Port Type Required What it is
Adjusted Files (output_files) files — Derived image files.

Options

Option Type Default What it does
compression_quality integer 90 JPEG/WebP compression quality.
kernel_divisor integer 40 The closing kernel is the page’s long side divided by this.
output_dir string — Optional output directory. Defaults to a temp directory.
output_format string jpg Derived image format. One of: jpg, png, tiff, webp.
strength number 1.0 Blend of the flattened lightness with the original (1 is all flattened).

The prompt it sends

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