Retrieves the underlying image data for an image as an ArrayBuffer.

Example

// Here image is expected to be an `Image` object
var ImageTools = require("FuseJS/ImageTools");
ImageTools.getBufferFromImage(image)
    .then(function(buf) { console.log("Image contains " + buf.byteLength + " bytes"); });

Location

Namespace
Fuse.ImageTools
Package
Fuse.ImageTools 1.9.0

Returns

Promise

a Promise of an ArrayBuffer of image data