ImageBitmapRenderingContext

Note: This feature is available in Web Workers.

The ImageBitmapRenderingContext interface is a canvas rendering context that provides the functionality to replace the canvas's contents with the given ImageBitmap. Its context id (the first argument to HTMLCanvasElement.getContext() or OffscreenCanvas.getContext()) is "bitmaprenderer".

This interface is available in both the window and the worker context.

Instance properties

ImageBitmapRenderingContext.canvas Read only

A read-only reference to the HTMLCanvasElement or OffscreenCanvas object that is associated with the given context.

Instance methods

ImageBitmapRenderingContext.transferFromImageBitmap()

Displays the given ImageBitmap in the canvas associated with this rendering context. Ownership of the ImageBitmap is transferred to the canvas. This was previously named transferImageBitmap(), but was renamed in a spec change. The old name is being kept as an alias to avoid code breakage.

Specifications

Specification
HTML
# the-imagebitmaprenderingcontext-interface

Browser compatibility

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
ImageBitmapRenderingContext
canvas
transferFromImageBitmap

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Uses a non-standard name.
Has more compatibility info.

See also