Film Negative to Positive Converter
Operator: Abdulla Al Fahad. How tools are built and checked
A colour negative scan looks orange because the film carries a coloured mask beside the picture: the base lets far more red than blue through, so every pixel is tinted before any exposure is considered. Inverting the scan, which is all a plain invert curve does, turns that tint blue and leaves the three channels with different contrast. This converter treats the scan as light that has passed through film. It measures the film base, divides it out, and only then inverts.
The result is a neutral positive to start editing from, not a film emulation. It handles colour negatives, black and white negatives and slides, a single frame or a roll of up to 24, and writes JPEG or PNG at 8 bits or TIFF at 16 bits. The preview is reduced for speed; every export is recomputed from the full-size file.
Key features
- Film base taken from the brightest unexposed pixels, with a warning when they are not on the frame border, or picked by dragging a box over clear rebate
- Density-space inversion: transmittance is the scan divided by the base in each channel, density is minus its base-10 logarithm, and light is the inverse of a film curve with an adjustable gamma
- A white point for each channel from a percentile of the picture, with the rebate left out, so the highlights of all three channels line up
- Red and blue contrast trims, a shadow percentile and a black point, to cancel a colour shift that differs between shadows and highlights
- Grey-world balance, a click-on-a-neutral patch, temperature, tint, exposure, contrast and saturation on top of the automatic balance
- Roll mode with one base and one set of points for all frames and a per-frame override, a black and white mode, a slide mode and a ZIP export of 16-bit TIFFs or JPEGs
How the orange mask is removed
Scans are read as sRGB by default. Choose gamma 2.2 or linear when the file comes straight from a scanner or a RAW developer without a gamma curve, because the density step takes a logarithm of linear light and a wrong encoding bends the curves. Uncompressed TIFF at 8 or 16 bits per channel is read directly, up to 60 megapixels. LZW or ZIP compressed TIFF is refused with a message.
Transmittance is the scan's linear value divided by the base's linear value in the same channel, capped at 1. Density is minus the base-10 logarithm of that. A green value of 0.0999 linear against a base of 0.451 has transmittance 0.2215 and density 0.655. The white point is the density at the chosen highlight percentile, and the film gamma then sets how many stops that range spans: stops equal the density range divided by gamma times log10 of 2.
The percentile statistics skip a 5% margin and every pixel within 10% of the film base in all three channels, so sprocket area and rebate do not drag the points toward the base. Black and white mode merges the three channels' bases and curves into one. Slide mode does not invert; it stretches levels per channel between the same percentiles.
How it works
Each file is decoded once and averaged down by a whole-number factor (the long side divided by 1400, rounded down, and at least 2) into a preview, so the preview's long side lands between roughly 700 and 2,100 pixels: a 9000 by 6000 scan previews at 1500 by 1000, and a file of 1400 pixels or less is used as it is. The base estimate, the percentile points and the grey-world balance all come from that preview, which keeps the sliders instant. Only the file itself is kept for the export.
Per-channel lookup tables turn the conversion into one table lookup per sample: 256 entries for an 8-bit scan, 65,536 for a 16-bit TIFF. A 24-megapixel export is therefore done in bands of 256 rows without a floating-point copy of the whole image.
In roll mode the base and the black and white points are the per-channel medians of all frames' estimates. A dark frame of a shaded street is then graded with the roll's base and not stretched on its own; tick the per-frame box for the odd frame that needs it.
Common use cases
- A 36-exposure C-41 roll shot over two days. Roll mode gives every frame the same base, so a frame shot in open shade and one shot in sun keep their relative exposure instead of each being stretched to full range.
- A black and white negative scanned in colour picks up a faint cast from the scanner lamp. Black and white mode merges the channels' bases and curves, so the greys come out grey without a correction pass.
- A negative copied on a light table with the sprocket edge cropped off. The base then comes from the brightest sky, which the warning calls out; dragging a box over an unexposed corner of the same frame gives a base that no longer depends on the sky.
How to use this tool
- Add the scans of one roll, with the film base visible and the scanner's colour correction switched off.
- Read the film base swatch. If it warns that no clear border was found, press Pick the base on the preview and drag a box over unexposed film.
- Set film gamma until the range looks right, then trim red and blue contrast if shadows and highlights carry different colour casts.
- Download one frame, or the roll as a ZIP.
Example
A frame whose clear rebate measures R 0.896, G 0.451, B 0.227 in linear scan values, an sRGB scan, film gamma 0.60 and a green white-point density of 1.15
Green channel of a mid-tone pixel: scan value 89 of 255What the converter does to that pixel
Linear 0.0999 divided by base 0.451 gives transmittance 0.2215
Density 0.655
Light = 10^(-(1.15 - 0.655) / 0.60) = 0.149
sRGB output 108 of 255Tips for best results
- The Tone and colour card reports the scene range, in stops, that your film gamma implies. If it reads far outside roughly 7 to 12 stops, change film gamma before touching contrast: moving 0.60 to 0.50 widens a 5.6-stop reading to 6.7.
- If shadows are too cyan while the highlights are neutral, raise the red contrast trim; if they are too red, lower it. A positive trim raises the red layer's gamma and lifts its shadows.
- Pick a neutral on a grey card or a concrete wall only after the base is right. Picking a neutral first tries to correct a base error with a gain, and the shadows will still be off.
- The base swatch in the Film and scan card should look like the pale orange of clear film. A swatch that is nearly white means the base was measured from a highlight in the picture, not from film.
Edge cases to watch
Scans made with automatic colour or automatic levels have already had the mask partly removed or the channels stretched, so a base measured from them is not the film's. Scan flat, with colour correction off.
A light source with gaps in its spectrum makes the three channels respond to the film's dyes differently from a scanner. Dividing by the base removes the overall tint but cannot restore colours the light never carried.
Dust, scratches and the infrared cleaning channel are out of scope. Dust shows as dark specks on the positive and there is no spotting tool on this page.
Common errors and how to fix them
- This TIFF uses compression 5 (or another number)
- LZW and ZIP compressed TIFFs are not decoded. Save an uncompressed TIFF from the scanning software, or export a PNG.
- A HEIC or RAW file could not be decoded
- Only JPEG, PNG, WebP and TIFF are read. Convert HEIC to JPEG first, and develop a RAW file to a TIFF with no tone curve applied.
Best practices
- Set the scan or camera exposure so the film base sits just below clipping in every channel, around 85% to 95% of full scale. A clipped base cannot be divided out.
- Light and expose every frame of a roll the same way. Roll mode's median only means something when the frames share their lighting.
- Export 16-bit TIFF only from a 16-bit scan. An 8-bit JPEG scan saved as TIFF has 16-bit numbers and 8-bit detail.
Frequently asked questions
How close are the colours to the original scene?
On a simulated 24-patch colour chart photographed through a film model with a base density of 0.25, 0.55 and 0.85, the mean colour difference (CIEDE2000) from the original sRGB values was 2.8 when the three layers had the same gamma. With layer gammas of 0.62, 0.58 and 0.55 it was 3.9, and with 0.70, 0.60 and 0.50 it was 6.1 until red and blue trims of +16.7% and -16.7% brought it to 2.7. That is a simulation, not a shot film chart, so treat the output as a starting point.
Why does roll mode use a median and not the first frame?
The first frame is often a test shot or a frame with a large sky. The per-channel median of all frames' base and black and white points is not moved by one odd frame, and any frame can still opt out.
Does it remove dust or scratches?
No. There is no spotting or infrared cleaning. Clean the film before scanning and retouch specks in an editor afterwards.
Can I use a camera and a light panel instead of a scanner?
Yes, provided a strip of clear film is in the frame, the panel gives even light and the file is JPEG, PNG, WebP or uncompressed TIFF. If the file is linear, set the scan encoding to Linear so the logarithm is taken of the right numbers.