get Image Data From Image Id
Type: Function
How to get getImageDataFromImageId?
JavaScript
import getImageDataFromImageId from 'fontoxml-image-resolver/src/getImageDataFromImageId.js'
Get the native width, height, and image data (as data url) for an image with the given ID.
For images referenced using a permanent reference ID, first use ReferencesManager#retrieve or ReferencesManager#retrieveSingle to obtain the corresponding image ID.
Arguments
view
Document Node (Required)
Type: HTMLDocument
A document node in the browser's DOM, used to create a temporary img element in order to load the image.
image
Remote Id (Required)
Type: AssetId
The remote ID of the image.
referrer
Remote Document Id (Required)
Type: RemoteDocumentId
The remote document ID of the document containing the image.
variant
(Required)
Type: String
The variant of the image to retrieve, see the documentation for the
asset/preview
endpoint for details.
Returns
Type: Promise<ImageData>