fix(raw): correct matrix direction and previewMatch block clipping condition for accurate RAW colors

This commit is contained in:
2026-10-05 20:58:13 +07:00
parent 1be75efd5a
commit d7ec00c08e
4 changed files with 21 additions and 26 deletions
+1 -1
View File
@@ -139,7 +139,7 @@ export function fitMatch(dev: Uint8Array, ref: Uint8Array, n = MATCH_GRID): Matc
// only the pedestal, and one the develop clipped has lost the ratio between
// its channels — none of them say anything about the rendering.
if (t[0] > CLIP && t[1] > CLIP && t[2] > CLIP) continue;
if (e[0] > CLIP || e[1] > CLIP || e[2] > CLIP) continue;
if (e[0] > CLIP && e[1] > CLIP && e[2] > CLIP) continue;
if (Math.max(t[0], t[1], t[2]) < FLOOR) continue;
used++;
blocks.push({ e, t });