---
title: "ImageBitmapRenderingContext | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Interface ImageBitmapRenderingContext

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".

[MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageBitmapRenderingContext)

interface ImageBitmapRenderingContext {  
    [canvas](#canvas): [OffscreenCanvas](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.OffscreenCanvas/) | [HTMLCanvasElement](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/);  
    [transferFromImageBitmap](#transferfromimagebitmap-1)(bitmap: [ImageBitmap](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ImageBitmap/) | null): void;  
}

##### Index

### Properties[](#properties)

[canvas](#canvas)

### Methods[](#methods)

[transferFromImageBitmap](#transferfromimagebitmap)

## Properties[](#properties-1)

### `Readonly`canvas[](#canvas)

canvas: [OffscreenCanvas](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.OffscreenCanvas/) | [HTMLCanvasElement](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/)

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.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageBitmapRenderingContext/canvas)

## Methods[](#methods-1)

### transferFromImageBitmap[](#transferfromimagebitmap)

-   transferFromImageBitmap(bitmap: [ImageBitmap](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ImageBitmap/) | null): void[](#transferfromimagebitmap-1)
    
    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.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageBitmapRenderingContext/transferFromImageBitmap)
    
    #### Parameters
    
    -   bitmap: [ImageBitmap](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ImageBitmap/) | null
    
    #### Returns void
