diff --git a/src/components/Panels.tsx b/src/components/Panels.tsx index 5fa197c..7dfe996 100644 --- a/src/components/Panels.tsx +++ b/src/components/Panels.tsx @@ -94,10 +94,15 @@ export function BasicPanel({ const [autoBusy, setAutoBusy] = useState(false); const [wbBusy, setWbBusy] = useState(false); + // Raws carry their pixels as a URL, with `thumb` empty; handing the empty + // string to the analysis made the decode fail and both Auto buttons quietly + // come back with neutral values, so Auto WB matched As shot exactly. + const thumbSrc = photo.thumbUrl ?? photo.thumb; + const auto = async () => { setAutoBusy(true); try { - const partial = await computeAutoEdits(photo.thumb); + const partial = await computeAutoEdits(thumbSrc); set(partial, 'Auto tone'); } finally { setAutoBusy(false); @@ -107,7 +112,7 @@ export function BasicPanel({ const autoWb = async () => { setWbBusy(true); try { - set(await computeAutoWhiteBalance(photo.thumb), 'Auto white balance'); + set(await computeAutoWhiteBalance(thumbSrc), 'Auto white balance'); } finally { setWbBusy(false); }