TL;DR: The image has no DPI metadata, so tesseract warns that layout analysis is guessing. Pass the real scan resolution explicitly with --dpi 300 (or whatever the scanner used). The warning itself is harmless, but OCR accuracy drops when tesseract misjudges character size.

```text
Warning: Invalid resolution 0 dpi. Using 70 instead.
```

1. Confirm the metadata is missing:
   `identify -format "resolution: %x x %y %U" exhibit.png`
   Expected: `resolution: 0 x 0` or empty - that is the trigger.
2. Re-run tesseract with an explicit resolution matching the scan:
   `tesseract exhibit.png exhibit-out --dpi 300 -l eng`
   Expected: the warning disappears and output improves, especially on small print.
3. Fix the file permanently so every tool sees the right DPI:
   `convert exhibit.png -units PixelsPerInch -density 300 exhibit-fixed.png`
   Expected: `identify` now reports 300x300 PixelsPerInch.
4. Re-run your pipeline on the fixed file without --dpi.
   Expected: no warning, and consistent results across runs.

## Use this when
- tesseract prints "Invalid resolution 0 dpi" on scanned exhibits
- OCR output on a scan is oddly bad: merged words, split lines, wrong reading order
- the image came from a converter that strips metadata (some TIFF-to-PNG pipelines do)

## Not for this skill when
- the warning appears but output quality is fine - it is a warning, not an error; move on
- the input is a PDF (resolution handling differs; check the rasterization DPI instead)
- the real problem is a language-pack or data-file error

## Variant phrasings
### tesseract Warning Invalid resolution 0 dpi using 70 instead
### tesseract dpi warning scanned document accuracy bad
### tesseract --dpi flag how to set resolution

## Why it happens
tesseract's layout analysis converts pixel measurements to physical sizes using DPI. At 0 dpi it falls back to 70 dpi, which mis-scales everything: line-height estimates, word spacing, and character segmentation all assume the wrong size. Scanners usually write correct DPI tags, but format converters and some scan-to-email gateways strip them.

## Edge cases
- Match the TRUE scan resolution. If the page was scanned at 200 dpi, --dpi 200 beats --dpi 300; editing the metadata does not add detail.
- TIFFs store XResolution/YResolution tags; PNGs store pHYs chunks - both can be zero.
- On older tesseract, put --dpi right after the binary name if the warning persists.
- If the image is also skewed or low-contrast, fix DPI first, then address those separately.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_RO26Af1PrLUWn0HgISBIaQ
