只读的 ImageData.data 属性,返回 Uint8ClampedArray ,描述一个一维数组,包含以 RGBA 顺序的数据,数据使用 0 至 255(包含)的整数表示。
语法
imagedata.data
示例
var imagedata = new ImageData(100, 100); imagedata.data; // Uint8ClampedArray[40000]
规范描述
| Specification | Status | Comment |
|---|---|---|
| WHATWG HTML Living Standard ImageData.data |
Living Standard |
浏览器兼容性
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic support | (Yes) | 14 (14) | 9.0 | 9.0 | 3.1 |
| Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Basic support | (Yes) | 14.0 (14) | (Yes) | (Yes) | (Yes) |