MoleHofje.net
OFF THE SENSOR

X-Trans broke demosaicing and converters still disagree

Every photosite on a sensor captures one colour. The rest is an educated guess — and which guess depends entirely on which software does the guessing.

A bare camera image-sensor chip lifted out of a camera body and lying on a workbench beside a lens mount and tweezers, its square colour-filter grid catching the light under magnif
The colour filter array sits on the silicon itself; two thirds of every pixel is reconstructed from its neighbours.

What the sensor actually records

A digital camera sensor is a grid of photosites, each one measuring light intensity. Intensity is a single number: brighter or dimmer. Photosites are not inherently sensitive to colour; to record it, manufacturers cover them with a mosaic of tiny filters — one red, one green, or one blue — so that each site sees only one part of the visible spectrum. The pattern used by almost every manufacturer is the Bayer array ↗, designed by Bryce Bayer at Kodak in the 1970s: a repeating two-by-two block with one red filter, one blue, and two green. The doubled green reflects the eye's greater sensitivity to middle wavelengths, which helps with luminance accuracy.

The consequence is that at any given photosite, two of the three colour values are missing. To reconstruct a full-colour image, the raw converter has to infer the missing channels from neighbouring sites — a process called demosaicing. How it does that interpolation, and how well it handles edges and fine detail while doing it, determines much of the apparent sharpness and colour fidelity of the final image. Two raw converters given the same file can produce noticeably different results not because they apply different adjustments, but because they made different interpolation choices before any slider was touched.

Hands sorting memory cards beside a card reader on a desk, laptop open behind with an import dialogue on screen. Raking light
Nothing on these cards has been interpreted yet.

Why Fujifilm files behave differently

Fujifilm's X-Trans sensor, introduced in the X-Pro1 in 2012, uses a larger, more irregular filter mosaic — a six-by-six block with green sites arranged in a pattern that avoids straight horizontal or vertical runs. The intent is to break up the regular periodicity that causes moiré without needing an optical low-pass filter in front of the sensor. By removing that filter, Fujifilm can extract more resolving power from a given pixel count.

The side effect is that demosaicing an X-Trans file is harder. The algorithms written for Bayer arrays cannot simply be applied to a six-by-six aperiodic block. Early converters struggled — Adobe ↗ added X-Trans support to Camera Raw, but for years users reported a characteristic worm-like softness in fine textures compared to Fujifilm's own software, which uses proprietary demosaicing tuned specifically to the pattern. Phase One's Capture One developed a reputation for cleaner X-Trans rendering, enough that it became a genuine reason some Fujifilm shooters switched converters rather than just trying new presets.

darktable, the open-source raw workflow, offers several demosaicing algorithms for X-Trans files, including its own implementations of established methods. The quality difference between algorithms is visible in fine repeated textures — fabric, foliage, hair — and invisible in flat tones. This is worth knowing because selecting a better demosaicing method in darktable is a one-time configuration choice that improves every file from that camera, for no cost beyond a few more seconds of processing time.

A desk drawer of labelled hard drives and memory cards
A drawer of drives is an archive only while something can still open what is on them.

The white balance step that follows

Demosaicing produces a full grid of RGB values, but they are still in the sensor's own colour space, weighted by the spectral sensitivity of its filters. White balance ↗ is applied by multiplying each channel by a different factor — boosting the blue channel in warm tungsten light, pulling it back in daylight — so that a neutral surface reads as neutral. On a raw file, this multiplication happens in software, after the data leaves the sensor, which means it is fully reversible. Change the white balance setting at any point in the edit and no information has been lost; the raw converter simply applies different multipliers to the same underlying numbers. Shoot JPEG and the multiplication is baked in at the moment of capture, with no way back.

The order matters: demosaic first, then apply white balance, then apply any tone curve. By the time a file lands in a converter's develop module, those first two steps have already shaped the image significantly. The sliders adjust what demosaicing and white balance have already constructed — which is why the same exposure value on two different converters can look like a different photograph. The interpolation happened before the edit began.