fix(raw): fix RAW preview matching, EXIF orientation alignment & studio initial state
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user