mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-24 10:09:01 -06:00
Decode every JPEG XL tile with wide (32-bit) modular buffers: the modular_16bit_buffers header flag does not hold on real lossy files (68 of 108 tiles failed with narrow buffers). Lossy (XYB) tiles are taken from the decoder as linear sRGB primaries and restored to the declared primaries with a plain 3x3 matrix, instead of the decoder's gamut-mapped, [0, 1]-clipped conversion. Lossy tiles whose declared encoding cannot be restored faithfully (ICC profile, non-linear transfer function, non-D65 white point, intensity target above 255 nits, single plane) are unsupported. Lossless output is unchanged. A JPEG XL tile that fails to decode is now an error for the image (the file falls back to its embedded preview) instead of a zero tile. Render cache version 17.