pbrtools
Version:
laya pbr tools
25 lines (17 loc) • 411 B
text/typescript
var parsehdr = require('parse-hdr');
import * as fs from 'fs';
function hdrToRaw(file:string){
var buff = fs.readFileSync(file);
var img = parsehdr(buff);
console.log(img.shape);
console.log(img.exposure);
console.log(img.gamma);
console.log(img.data[1]);//w*h*3
}
function hdrToPng(path:string){
}
function testReadHDR(){
/*
*/
}
//testReadHDR();