The ImageBitmap
interface represents a bitmap image which can be drawn to a <canvas>
without undue latency. It can be created from a variety of source objects using the createImageBitmap()
factory method. ImageBitmap
provides an asynchronous and resource efficient pathway to prepare textures for rendering in WebGL.
Properties
ImageBitmap.height
Read only- Is an
unsigned
long
representing the height, in CSS pixels, of theImageData
. ImageBitmap.width
Read only- Is an
unsigned
long
representing the width, in CSS pixels, of theImageData
.
Methods
ImageBitmap.close()
-
Disposes of all graphical resources associated with an
ImageBitmap
.
Specifications
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of 'ImageBitmap' in that specification. |
Living Standard |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
ImageBitmap | Chrome Full support 50 | Edge Full support 79 | Firefox Full support 42 | IE No support No | Opera Full support 37 | Safari No support No | WebView Android Full support 50 | Chrome Android Full support 50 | Firefox Android Full support 42 | Opera Android Full support 37 | Safari iOS No support No | Samsung Internet Android Full support 5.0 |
close | Chrome Full support 52 | Edge Full support 79 | Firefox Full support 46 | IE No support No | Opera Full support 37 | Safari No support No | WebView Android Full support 52 | Chrome Android Full support 52 | Firefox Android Full support 46 | Opera Android Full support 37 | Safari iOS No support No | Samsung Internet Android Full support 6.0 |
height | Chrome Full support 50 | Edge Full support 79 | Firefox Full support 42 | IE No support No | Opera Full support 37 | Safari No support No | WebView Android Full support 50 | Chrome Android Full support 50 | Firefox Android Full support 42 | Opera Android Full support 37 | Safari iOS No support No | Samsung Internet Android Full support 5.0 |
width | Chrome Full support 50 | Edge Full support 79 | Firefox Full support 42 | IE No support No | Opera Full support 37 | Safari No support No | WebView Android Full support 50 | Chrome Android Full support 50 | Firefox Android Full support 42 | Opera Android Full support 37 | Safari iOS No support No | Samsung Internet Android Full support 5.0 |
Legend
- Full support
- Full support
- No support
- No support