* Displays the extracted data as an image for web apps. * @param {ArrayBuffer} data * @returns {html}
(data)
| 91 | * @returns {html} |
| 92 | */ |
| 93 | present(data) { |
| 94 | if (!data.byteLength) return ""; |
| 95 | const type = isImage(data); |
| 96 | |
| 97 | return `<img src="data:${type};base64,${toBase64(data)}">`; |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | const COLOUR_OPTIONS = ["Red", "Green", "Blue", "Alpha"]; |