From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/api/imagedata/data/index.html | 95 +++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 files/zh-cn/web/api/imagedata/data/index.html (limited to 'files/zh-cn/web/api/imagedata/data') diff --git a/files/zh-cn/web/api/imagedata/data/index.html b/files/zh-cn/web/api/imagedata/data/index.html new file mode 100644 index 0000000000..c25770cb3b --- /dev/null +++ b/files/zh-cn/web/api/imagedata/data/index.html @@ -0,0 +1,95 @@ +--- +title: ImageData.data +slug: Web/API/ImageData/data +translation_of: Web/API/ImageData/data +--- +

{{APIRef("Canvas API")}}

+ +

只读的 ImageData.data 属性,返回 {{jsxref("Uint8ClampedArray")}} ,描述一个一维数组,包含以 RGBA 顺序的数据,数据使用  0 至 255(包含)的整数表示。 

+ +

语法

+ +
imagedata.data
+
+ +

示例

+ +
var imagedata = new ImageData(100, 100);
+imagedata.data; // Uint8ClampedArray[40000]
+
+ +

规范描述

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', 'scripting.html#dom-imagedata-data', 'ImageData.data')}}{{Spec2('HTML WHATWG')}} 
+ +

浏览器兼容性

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}}{{CompatGeckoDesktop("14")}}9.09.03.1
+
+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}}{{CompatGeckoMobile("14")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

参见

+ + + +
 
-- cgit v1.2.3-54-g00ecf