{{APIRef("Canvas API")}}
The ImageBitmap
interface represents a bitmap image which can be drawn to a {{HTMLElement("canvas")}} without undue latency. It can be created from a variety of source objects using the {{domxref("ImageBitmapFactories.createImageBitmap", "createImageBitmap()")}} factory method. ImageBitmap
provides an asynchronous and resource efficient pathway to prepare textures for rendering in WebGL.
Properties
- {{domxref("ImageBitmap.height")}} {{readonlyInline}}
- Is an
unsigned
long
representing the height, in CSS pixels, of theImageData
. - {{domxref("ImageBitmap.width")}} {{readonlyInline}}
- Is an
unsigned
long
representing the width, in CSS pixels, of theImageData
.
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('HTML WHATWG', "webappapis.html#imagebitmap", "ImageBitmap")}} | {{Spec2('HTML WHATWG')}} |
Browser compatibility
{{ CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | {{CompatUnknown}} | {{CompatGeckoDesktop(42)}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatGeckoMobile(42)}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
See also
- {{domxref("ImageBitmapFactories.createImageBitmap()")}}
- {{domxref("CanvasRenderingContext2D.drawImage()")}}
- {{domxref("WebGLRenderingContext.texImage2D()")}}