ImageBitmap

由於本文件沒有此語言的翻譯版本,您閱讀的是英文版的內容。 幫助我們翻譯這篇文章!

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 the ImageData.
ImageBitmap.width Read only
Is an unsigned long representing the width, in CSS pixels, of the ImageData.

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

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
ImageBitmapChrome Full support 50Edge No support NoFirefox Full support 42IE No support NoOpera Full support 37Safari No support NoWebView Android Full support 50Chrome Android Full support 50Firefox Android Full support 42Opera Android Full support 37Safari iOS No support NoSamsung Internet Android Full support 5.0
closeChrome Full support 52Edge No support NoFirefox Full support 46IE No support NoOpera Full support 37Safari No support NoWebView Android Full support 52Chrome Android Full support 52Firefox Android Full support 46Opera Android Full support 37Safari iOS No support NoSamsung Internet Android Full support 6.0
heightChrome Full support 50Edge No support NoFirefox Full support 42IE No support NoOpera Full support 37Safari No support NoWebView Android Full support 50Chrome Android Full support 50Firefox Android Full support 42Opera Android Full support 37Safari iOS No support NoSamsung Internet Android Full support Yes
widthChrome Full support 50Edge No support NoFirefox Full support 42IE No support NoOpera Full support 37Safari No support NoWebView Android Full support 50Chrome Android Full support 50Firefox Android Full support 42Opera Android Full support 37Safari iOS No support NoSamsung Internet Android Full support Yes

Legend

Full support  
Full support
No support  
No support

See also