Skip to content

Commit

Permalink
chore: testbed improved a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele-pelagatti committed Nov 9, 2023
1 parent c5759fc commit 04c4778
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,20 @@

const res = libraryInstance.extractJpegR(buf, buf.length)
console.log(res)

downloadBlob(res.sdr, 'unpacked-sdr.jpg', 'image/jpeg')
downloadBlob(res.gainMap, 'unpacked-gainmap.jpg', 'image/jpeg')
if (res.success) {
downloadBlob(res.sdr, 'unpacked-sdr.jpg', 'image/jpeg')
downloadBlob(res.gainMap, 'unpacked-gainmap.jpg', 'image/jpeg')
} else {
console.error(res.errorMessage)
}

}
}
start()

</script>
<h1>libultrahdr wasm testbed</h1>
<h2>test encoding</h2>
<div>
SDR
<input type="file" id="sdr" accept="image/jpeg" />
Expand All @@ -134,9 +138,10 @@ <h1>libultrahdr wasm testbed</h1>
<input type="file" id="metadata" accept="application/json" />
</div>
<br />
<h2>test decoding</h2>
<div>
HDR
<input type="file" id="packedGainmap" />
packed gainmap:
<input type="file" id="packedGainmap" accept="image/jpeg" />
<button id="unpack-gainmap">UNPACK GAINMAP</button>
</div>

Expand Down

0 comments on commit 04c4778

Please sign in to comment.