graph3  ·  film scanning pipeline

Linear space inversion display

Why negative inversion must happen in linear space — and how a Lightroom import tone curve applied before inversion permanently destroys toe and shoulder detail that was present in the original scan.

Lightroom import profile:
1 · film negative
H&D curve
density D
vs log H
2 · light thru film → sensor electrons
Sensor electrons
raw file:
always linear
3 · Lightroom import
Import result
4 · negative inversion
Inverted signal
5 · display output
Display
T = 10^−D
LR import
invert
gamma + display
tone curve on import → toe & shoulder crushed after inversion
Crushed result
linear import → inversion works correctly → tones preserved
Correct result

v^2.2
Display power function. Every monitor applies this to incoming pixel values. Gamma encoding pre-compensates with v^(1/2.2) so the eye sees linear brightness — but only if it is applied last.
1 − v
Negative inversion in linear space. The entire operation is a simple arithmetic flip. It only produces a correct positive if v is a linear representation of transmittance at that point.
3 profiles
Lightroom profiles that preserve linearity: "Linear" (built-in), Negative Lab Pro's linear import profile, and any custom DCP with a flat tone curve and no look table.
why the raw file is always linear
A camera sensor is a photon counter. Each photosite accumulates electrons in direct proportion to the number of photons that hit it during the exposure. The raw file records those electron counts as integers — no tone curve, no gamma, no colour matrix applied yet. The raw file is always linear regardless of what camera or scanner produced it. What varies is what software does to that linear data at the moment of import or development.
what Lightroom's default profiles actually do
When you import a raw file into Lightroom with a profile such as Adobe Color, Camera Standard, or any manufacturer profile, Lightroom applies a DCP (Digital Camera Profile) that contains a tone curve and often a look table. The tone curve is an S-shaped function that lifts shadows, adds contrast in the midtones, and rolls off highlights. For direct photography this looks pleasing because it mimics the response of negative film. For a scan of a negative, it is the wrong operation — it applies a film-like response on top of data that already encodes film response, and does so before the inversion that is needed to convert the negative into a positive.
why operation order is irreversible
Inversion is the operation v → 1 − v. It is only mathematically meaningful when v is a linear representation of the scene — specifically, a value proportional to the transmittance T at each point of the negative. If a tone curve has already been applied, v is no longer proportional to T. It is a bent, compressed version of T. Inverting it with 1 − v produces a result that is the inversion of a bent curve, not the inversion of the underlying scene luminance. The toe of the original negative (dense shadows, low T) was lifted by the tone curve before inversion; after inversion it becomes a compressed highlight. The shoulder (thin highlights, high T) was compressed by the tone curve; after inversion it becomes a blocked shadow. These are not recoverable errors — the tonal relationships have been permanently scrambled. No adjustment in Lightroom after inversion can undo a non-linear operation that was applied before inversion.
the correct workflow — linear through to inversion
Import the raw scan with a linear profile. In Lightroom this means selecting the built-in Linear profile in the Basic panel, or using a plugin such as Negative Lab Pro which handles this automatically. With a linear import, the data passed to the inversion operation is proportional to transmittance, the inversion is arithmetically correct, and the resulting positive has intact tonal relationships from toe to shoulder. Gamma encoding — the v^(1/2.2) step that prepares the image for display — is then applied as the final step, either by Lightroom's output transform or by the operating system's colour management pipeline. This is the only order in which all three operations (normalise, invert, gamma-encode) produce a mathematically correct result.
toggle the import profile to see the damage
Switch between the two import modes using the buttons above. In the pipeline, stage 3 highlights red (wrong) or green (correct). In the result cards below, the dashed grey line in the left card shows the correct curve overlaid on the damaged one — the gap between them is the tonal information that was irreversibly destroyed by applying the tone curve before inversion. Notice that the damage is worst at the extremes: deep shadows in the scene (high density in the negative, low electrons, left side of the x-axis) and bright highlights (low density, high electrons, right side) both suffer more than the midtones. This is the characteristic signature of a premature gamma or tone-curve operation on negative film data.