Hacker News new | ask | show | jobs
by shlomsh 17 days ago
Rendering the page twice and using the second pass as a mask for what the pictures paint is a nice way around the inverted-photo problem.

One question about full-page scans. Since the whole page is one image, a scanned book with a photo or a chart on it gets recoloured like text, so the picture still turns into a negative. I’ve been finding text lines on scanned pages straight from the pixels for a highlighter tool, and text lines are fairly regular: similar height, even spacing, dark ink on light paper. Have you tried something like that to keep the picture regions of a scan in colour, or is it not worth it in practice?