Give Auto tone and Auto WB the raw's thumbnail URL.
Raw records keep their pixels in `thumbUrl` and leave `thumb` empty, so the analysis was handed an empty string, failed to decode, and returned neutral values — which made Auto WB look identical to As shot. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
@@ -94,10 +94,15 @@ export function BasicPanel({
|
|||||||
const [autoBusy, setAutoBusy] = useState(false);
|
const [autoBusy, setAutoBusy] = useState(false);
|
||||||
const [wbBusy, setWbBusy] = 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 () => {
|
const auto = async () => {
|
||||||
setAutoBusy(true);
|
setAutoBusy(true);
|
||||||
try {
|
try {
|
||||||
const partial = await computeAutoEdits(photo.thumb);
|
const partial = await computeAutoEdits(thumbSrc);
|
||||||
set(partial, 'Auto tone');
|
set(partial, 'Auto tone');
|
||||||
} finally {
|
} finally {
|
||||||
setAutoBusy(false);
|
setAutoBusy(false);
|
||||||
@@ -107,7 +112,7 @@ export function BasicPanel({
|
|||||||
const autoWb = async () => {
|
const autoWb = async () => {
|
||||||
setWbBusy(true);
|
setWbBusy(true);
|
||||||
try {
|
try {
|
||||||
set(await computeAutoWhiteBalance(photo.thumb), 'Auto white balance');
|
set(await computeAutoWhiteBalance(thumbSrc), 'Auto white balance');
|
||||||
} finally {
|
} finally {
|
||||||
setWbBusy(false);
|
setWbBusy(false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user