fix(raw): fix RAW preview matching, EXIF orientation alignment & studio initial state

This commit is contained in:
2026-10-06 12:23:38 +07:00
parent 23f534ffb8
commit 2e1feb195a
6 changed files with 333 additions and 31 deletions
+28
View File
@@ -0,0 +1,28 @@
import { readFileSync } from 'node:fs';
import LibRaw from 'libraw-wasm';
const files = [
'D0004128.DNG',
'DSCF1701.RAF',
'P1010256.RW2',
'_3279791.ORF',
'APACHAI-20160215-357.NEF'
];
for (const file of files) {
try {
const bytes = readFileSync('../' + file);
const raw = new LibRaw();
await raw.open(bytes, { halfSize: true, noAutoScale: true });
const meta = await raw.metadata(true);
const cd = meta?.color_data;
console.log(`=== ${file} ===`);
console.log('cam_mul:', cd?.cam_mul);
console.log('pre_mul:', cd?.pre_mul);
console.log('rgb_cam:', cd?.rgb_cam);
console.log('cam_xyz:', cd?.cam_xyz);
raw.dispose();
} catch (err) {
console.log(`Error reading ${file}:`, err.message);
}
}