Image tools

Document enhance

Clean up a photographed or scanned document: grayscale with contrast stretched to the full range, or a hard black/white threshold for a photocopier look. Operates on an already-captured image file. No camera access. Runs entirely on your device.

Runs on your device. The file is never uploaded.

Document enhance turns a photographed page grey and stretches its contrast until the darkest pixel is black and the lightest is white, keeping your format with an -enhanced suffix. Threshold mode then forces each pixel either side of a cutoff, 128 by default. It corrects no perspective and finds no page edges, so crop and straighten the shot first.

Input

Options

Questions

What does it do to a photo of a document?

Two things, depending on the mode. Grayscale converts to gray and stretches the contrast so the darkest pixel in the picture becomes black and the lightest becomes white, which lifts a dim phone photo. Threshold does the same stretch and then forces every pixel to pure black or pure white, giving the hard photocopier look. Grayscale is the default.

What is the threshold value?

A cutoff from 0 to 255, default 128, used only in threshold mode: after the contrast stretch, pixels at or above it become white and everything below becomes black. Lower it to keep more ink, raise it to clear more background speckle. A value outside the range stops with "threshold must be a whole number between 0 and 255".

Can it take a photo with my camera or straighten the page?

No on both counts. It works on an image file you already have, with no camera access. It does not detect page edges, correct perspective, deskew a tilted scan, remove shadows selectively, or crop the background away. Crop the page yourself with Crop image, straighten it with Rotate image, then run this.

Does it produce a PDF?

No, it produces an image in the same format you dropped in, named with an -enhanced suffix, such as receipt-enhanced.jpg, encoded at the Quality option, default 90, for JPG and WebP. To read the words out of the page afterwards, use Image to text (OCR).

Why does the summary mention a source range?

Because the contrast stretch depends on it, and seeing it explains the result. The line reads like "scan.jpg: grayscale, contrast stretched (source range was 40-190)", which tells you how much headroom there was. If the darkest and lightest pixels are already 0 and 255 the stretch changes nothing, and a completely flat image is left as its own constant gray rather than divided by zero.

Related Image tools