UNPKG

pbrtools

Version:
19 lines (18 loc) 402 B
"use strict"; var parsehdr = require('parse-hdr'); const fs = require("fs"); function hdrToRaw(file) { 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) { } function testReadHDR() { /* */ } //testReadHDR();