For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.
Interface ImageBitmapRenderingContext
interface ImageBitmapRenderingContext {
canvas: OffscreenCanvas | HTMLCanvasElement;
transferFromImageBitmap(bitmap: ImageBitmap | null): void;
}
canvas: OffscreenCanvas | HTMLCanvasElement;
transferFromImageBitmap(bitmap: ImageBitmap | null): void;
}
Properties
Readonlycanvas
The ImageBitmapRenderingContext.canvas property, part of the Canvas API, is a read-only reference to the HTMLCanvasElement or OffscreenCanvas object that is associated with the given context.
Methods
transferFromImageBitmap
-
The
ImageBitmapRenderingContext.transferFromImageBitmap()method displays the given ImageBitmap in the canvas associated with this rendering context. The ownership of the ImageBitmap is transferred to the canvas as well.Parameters
- bitmap: ImageBitmap | null
Returns void
The
ImageBitmapRenderingContextinterface 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".MDN Reference