Land camera-native raw profiles, real ICC soft proofing and 16-bit proxies.

Camera profiles, proofing tables and the half-float sidecar all have to agree
with the pixels the editor actually grades, so they land together with the
preset filter menu that was unusable while thumbnails streamed in.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
2026-11-28 03:59:55 +00:00
parent 6dfddffc14
commit 0c113e7a91
53 changed files with 9217 additions and 476 deletions
+25
View File
@@ -117,6 +117,30 @@ export function findPreview(id) {
return null;
}
/**
* The 16-bit sidecar for a raw proxy: the samples LibRaw decoded, before the
* JPEG quantised them. Its name keeps a second extension so `findPreview` keeps
* returning the JPEG for browsers and for photos imported before this existed.
*/
export async function writePreview16(id, data) {
ensureDirs();
const target = path.join(storageRoot(), 'previews', `${safeId(id)}.p16.png`);
await fsp.writeFile(target, data);
return target;
}
export function findPreview16(id) {
const safe = lookupId(id);
if (!safe) return null;
const p = path.join(dirs().previews, `${safe}.p16.png`);
return fs.existsSync(p) ? p : null;
}
export async function removePreview16(id) {
const found = findPreview16(id);
if (found) await fsp.rm(found, { force: true });
}
/**
* Denoised proxies, keyed by the hash of the parameters that produced them, so
* switching Amount back to a previous value reuses the file instead of spending
@@ -209,6 +233,7 @@ export async function removeAsset(id) {
const files = [
findOriginal(id),
findPreview(id),
findPreview16(id),
findThumb(id),
findProof(id),
findProofThumb(id),