diff --git a/index.html b/index.html index cbcab50a..f19bd25a 100644 --- a/index.html +++ b/index.html @@ -115,9 +115,12 @@ 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) + } } } @@ -125,6 +128,7 @@