mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-24 18:18:12 -06:00
#1123 gives HDR and panorama merges of raws without colour matrices the colour they open with, but writes ColorMatrix1 from the forward matrix, so the as-shot white the DNG declares lands wherever the fitted look and the generic camera model take it. On real ILCE-7M3 brackets the HDRs opened at As Shot 6113–7307 K / +115 (Duv +0.038) where the ARWs show 3932–5268 K / +7, and any white-balance edit turned them green (CIEDE2000 11–13 against the ARW at the same Temp/Tint). The render at As Shot was right (0.4–0.8). The colour matrices now declare the white balance the source shows, decided by files::WbScaleOf (new dng_white): the camera's measured matrices when they give the source's scale (lightcraft_raw::spectral; the DNG then reads every white as the source does), else a matrix under which the as-shot neutral is the white the scale shows (Sony's presets' reading, 6500 K / 0 on the relative scale, the file's own white otherwise). Forward matrix and neutral are unchanged, so is the render at As Shot. Measured on the same brackets with this change on a fork build: As Shot 4813 / 5268 / 3932 K, +8 / +8 / +7 as the ARWs (declared white Duv +0.003); same Temp/Tint within CIEDE2000 0.8–1.7 of the ARW for most changes, about 5 for the largest (5268 → 3200 K, 3932 → 6500 K: the ARW adapts its look with Bradford, the DNG rebalances in camera space). Tests: a merged DNG shows its source's As Shot on all four scales (measured matrices, presets, relative, own); with a look that tints white the DNG declares the shown white, gives the measured model's multipliers at other whites and renders at As Shot as the source does. Both fail on main (ILCE-7M3 case: (7342, 115) for (5268, 8)). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015gRtdWF1E9358FfzhzYqCS