Painting in.

Friday, July 17th, 2020

I found a stack of negatives in some stuff I retrieved from the basement, and after some finicking with the transparency adapter part of our flatbed scanner, I brought a few into the digital domain.

When they’ve been in the basement for decades one shouldn’t be surprised if they have loads of dust and scratches…huge, huge scratches across the surface, folds in the negatives itself, seemingly insurmountable problems.

But there’s a tool in several modern paint programs. Photoshop calls it the ‘healing brush’ and Affinity Photo calls it the ‘inpainting brush’.

The problem is that a paint program can’t know what’s “underneath” a scratch or film damage—what isn’t there now.

So if you use the traditional erase tools, you’d just end up with a solid color of nothing…because it’s got nothing.

But the inpainting tool does a lot of evaluating images and patterns and figures out first of all, if you sloppily draw a line over a scratch, that there is something in that swiped-over area that I don’t want, and it’s smart enough to figure it’s probably substantially brighter or darker than a lot of the underlying picture. It also does some frequency analysis and determines that the damage is, often, crisper than the underlying image that has been scratched. It seems like magic: you casually draw a fat red line over the problem, and then the software kicks in.

Affinity offers this not-very helpful description: “Complex algorithms then take over to harvest information from the surrounding areas of the image in order to reconstruct the missing data.”

So it figures out that there’s a pattern to the fuzzy record albums in this case and constructs appropriate color (or greyscale) values to fill in just the scratched part.

It takes a fraction of a second…sometimes an entire section, if you’re inpainting a large area.

This works great for power lines, unwanted people or animals, but most importantly dust and scratches. Its batting average of doing the right thing is remarkable…and if you don’t like its choices, hit undo and try again.

It’s amazing. It’s a huge timesaver.