nx.js
Functions

createImageBitmap

createImageBitmap(image, options)

createImageBitmap(image, options?): Promise<ImageBitmap>

Creates a bitmap from a given source, optionally cropped to contain only a portion of that source. This function accepts a variety of different image sources, and returns a Promise which resolves to an ImageBitmap.

Parameters

ParameterType
imageImageBitmapSource
options?ImageBitmapOptions

Returns

Promise<ImageBitmap>

See

https://developer.mozilla.org/docs/Web/API/createImageBitmap

createImageBitmap(image, sx, sy, sw, sh, options)

createImageBitmap(image, sx, sy, sw, sh, options?): Promise<ImageBitmap>

Parameters

ParameterType
imageImageBitmapSource
sxnumber
synumber
swnumber
shnumber
options?ImageBitmapOptions

Returns

Promise<ImageBitmap>

On this page