MCPcopy
hub / github.com/gchq/CyberChef / present

Method present

src/core/operations/ViewBitPlane.mjs:93–98  ·  view source on GitHub ↗

* Displays the extracted data as an image for web apps. * @param {ArrayBuffer} data * @returns {html}

(data)

Source from the content-addressed store, hash-verified

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
101const COLOUR_OPTIONS = ["Red", "Green", "Blue", "Alpha"];

Callers

nothing calls this directly

Calls 2

isImageFunction · 0.90
toBase64Function · 0.90

Tested by

no test coverage detected