diff --git a/docker/frontend/src/engine/rawDevelop.ts b/docker/frontend/src/engine/rawDevelop.ts index 5fad523..bf72b1d 100644 --- a/docker/frontend/src/engine/rawDevelop.ts +++ b/docker/frontend/src/engine/rawDevelop.ts @@ -72,7 +72,7 @@ const SETTINGS = { outputBps: 16, outputColor: 0, noAutoScale: true, - useCameraWb: false, + useCameraWb: true, noAutoBright: true, gamm: [1, 1] as [number, number], userQual: 3, @@ -367,8 +367,13 @@ export async function developRaw(bytes: Uint8Array): Promise { const effect = Skia.RuntimeEffect.Make(RAW_DEVELOP_SKSL); if (!effect) throw new Error('develop shader failed to compile'); - const green = cd.cam_mul[1] || 1; - const mul = cd.cam_mul.map((v) => v / green); + const rawMul = (cd?.cam_mul && cd.cam_mul.some((v: number) => v > 0 && v !== 1)) + ? cd.cam_mul + : (cd?.pre_mul && cd.pre_mul.some((v: number) => v > 0)) + ? cd.pre_mul + : [1, 1, 1, 1]; + const green = rawMul[1] || rawMul[3] || 1; + const mul = rawMul.map((v: number) => v / green); const row = (i: number) => cd.rgb_cam[i].slice(0, 3); const [r0, r1, r2] = [row(0), row(1), row(2)]; diff --git a/docker/recipescam-images.tar.gz b/docker/recipescam-images.tar.gz index f163e4e..541803c 100644 Binary files a/docker/recipescam-images.tar.gz and b/docker/recipescam-images.tar.gz differ diff --git a/docker/recipescam-images.tar.gz.sha256 b/docker/recipescam-images.tar.gz.sha256 index db6d094..084cc65 100644 --- a/docker/recipescam-images.tar.gz.sha256 +++ b/docker/recipescam-images.tar.gz.sha256 @@ -1 +1 @@ -f434fd494a98a7c0b280d2dd9bc142f00faf399436c068735bc854c911a64046 recipescam-images.tar.gz +60f452b2fa01abce7084a4e347b9c222a27d2bc63d8bbfec1cf75727cc29b2e9 recipescam-images.tar.gz