← writing
29 July 2026

Seeing a drawing inside out

Old drawings separated from their paper, then inverted. What the paper/ink switch brings out in a sixteenth-century sheet, and what it distorts, since an analysis tool also changes what it shows.

This site has two surfaces, paper and ink, and a mark that represents a switch. Until now the switch was only for reading comfort. With old drawings on the pages, it became an instrument for observation. Inverting a sixteenth-century sheet reveals what normal reading did not show, rather like an X-ray, without anything being added.

01separating the drawing from the paper

A drawing is ink on paper. Once the lighting of the photograph has been corrected, the sheet can be treated as ink composited over white, and that compositing can be inverted: alpha becomes the distance from white, colour becomes the colour of the ink. The background disappears, and the page tone shows through the drawing, which then becomes part of the page instead of sitting on it.

javascript
// alpha = distance from white; the colour is the ink under the white
const alpha = 1 - Math.min(r, g, b) / 255;
if (alpha < threshold) return TRANSPARENT;        // bare paper
const ink = [r, g, b].map((v) => (v - 255 * (1 - alpha)) / alpha);

// Composited over any surface, the result reproduces the original.
// That is what makes mix-blend-mode unnecessary.

The same image therefore works on both surfaces. On the ink surface, a colour matrix renders the ink on the dark background: a dense stroke stays dense and a light one stays light, since alpha measures ink density. A woodcut then appears as silver on black.

Writing this processing by hand would have taken days. It was built through successive exchanges: I describe what looks wrong, the assistant proposes a treatment, we measure it, we start again. Nothing about the keying is automatic. It took five passes, and each came from a defect seen on screen.

  • A single threshold is not enough: the photograph has a lighting gradient, and the silk on the first sheet ranged from 0.02 to 0.20 away from white depending on the spot. The lighting had to be corrected before the sheet could be analysed.
  • The mounting bands of a scroll are as far from white as the shaded silk. No threshold can separate them: they have to be located first, then excluded from the calculation.
  • The first spot-cleaning pass kept any cluster touching the edge of its band, on the grounds that it continued into the drawing. For the top band, that edge is the edge of the sheet, so every spot there remained. A one-line error, invisible without looking at the result.

The division of work matters: the machine handles the calculations (percentiles, connected components, colour matrices), and the eye decides. None of the five corrections would have been found by measurement alone, because none of them shows in the numbers. They show on the page.

Detail of Claude Lorrain’s wash: the line of trees and the sky above it.
Claude Lorrain, detail. The white of the ground is the paper itself; it was never painted. On the ink surface the paper turns black: the sky darkens without a single sky pixel being changed.
02what the flip reveals
  • On Lorenz Stöer’s woodcut of 1567, the negative clearly separates the solids from the ruins: a tangle of hatching becomes a readable mesh, four centuries before wireframe models.
  • On Seurat’s conté drawing, which has no outline at all, the inversion shows that the form consists only of densities: the lighthouse is visible only because the grain becomes sparser around it.
  • On Claude Lorrain’s wash drawing, the keying first brought out the foxing on the paper, invisible to the naked eye and impossible to tell from a light wash with a threshold. Their shape tells them apart: a spot is isolated, whereas a mark in the drawing belongs to a larger mass.
Detail of Lorenz Stöer’s woodcut: the geometric solids in the foreground.
Lorenz Stöer, 1567, detail. On the ink surface the mesh separates from the ruins and the hatching reads as edges. On the paper surface the two blend together more.
03what the tool distorts

The processing divides colour by alpha, so a light stroke comes out more saturated than it is on the sheet. On Backhuysen’s ship, the visible red lines are the drawing’s brown ink, an oxidised iron-gall ink, exaggerated by the processing. The museum states that the underdrawing is in black chalk, so these are not preparatory lines. Deciding that a spot is not part of the drawing is already an interpretation. The code that makes this decision is forty lines long, and its rule is open to debate; that is the subject of this article.

Detail of Backhuysen’s ship: the hull and the lower rigging.
Ludolf Backhuysen, detail. The red lines are the drawing’s oxidised iron-gall ink. The processing saturates them, because it divides colour by alpha. The underdrawing, in black chalk, stays almost invisible.
04how this was done

The graphic design (design tokens, surfaces, the switch-shaped mark) was done in Claude Design, then the implementation and all the image processing in Claude Code. The first stage sets rules; the second applies and tests them, which leads to dropping a few of them.

The least predictable part was the research. Finding, in museums’ open collections, a plate that suits the point of a page requires knowing what you are looking for: that an album is an inventory, that a mezzotint is made by removing black, that the squaring grid on a Cambiaso drawing is a construction left visible. Without that knowledge, you query an API with keywords and get the same results as everyone else. The selection stayed manual: two proposals that looked convincing on paper, a sheet of screaming grotesques and a sheet of nudes, were rejected simply by looking at them.

Two conditions governed every choice: that the author be in the public domain, and that the institution itself publish its reproduction openly. The age of the subject is not enough, since a 1960s drawing of an 1880 liner is still protected, and seeing a work in a museum does not give the right to reproduce it.

05trying the switch

The switch is yours to use below. The twelve sheets are grouped into four themes and can be browsed with the keyboard: up and down for the two surfaces, left and right to change plate. It is the same control as the mark at the top of the page, used here to look at the drawings rather than to set a display preference.

experiment

Twelve sheets, four themes, one switch. Up and down change the surface, left and right change the plate. By keyboard, by finger, or with the buttons.