This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The ImageBitmapRenderingContext
interface is a canvas rendering context which only 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.
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.
Currently drafted as a proposal in the OffscreenCanvas specification.
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | 55.0 | 46 (46) | No support | 42 | No support |
transferImageBitmap() ->transferFromImageBitmap()
| ? | 52 (52) | No support | ? | No support |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | 55.0 | 46.0 (46) | No support | 42 | 55.0 |
transferImageBitmap() ->transferFromImageBitmap()
| ? | 52.0 (52) | No support | ? | ? |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmapRenderingContext