未验证 提交 4abd3f1f 编写于 作者: O openharmony_ci 提交者: Gitee

!6693 Image文档示例优化

Merge pull request !6693 from 徐蕊w/master
...@@ -65,8 +65,13 @@ createPixelMap(colors: ArrayBuffer, options: InitializationOptions, callback: As ...@@ -65,8 +65,13 @@ createPixelMap(colors: ArrayBuffer, options: InitializationOptions, callback: As
const color = new ArrayBuffer(96); const color = new ArrayBuffer(96);
let bufferArr = new Uint8Array(color); let bufferArr = new Uint8Array(color);
let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 } } let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 } }
image.createPixelMap(color, opts, (pixelmap) => { image.createPixelMap(color, opts, (error, pixelmap) => {
}) if(error) {
console.log('Failed to create pixelmap.');
} else {
console.log('Succeeded in creating pixelmap.');
}
})
``` ```
## PixelMap<sup>7+</sup> ## PixelMap<sup>7+</sup>
...@@ -2030,10 +2035,10 @@ img.release().then(() =>{ ...@@ -2030,10 +2035,10 @@ img.release().then(() =>{
**系统能力:** 以下各项对应的系统能力均为SystemCapability.Multimedia.Image.Core **系统能力:** 以下各项对应的系统能力均为SystemCapability.Multimedia.Image.Core
| 名称 | 默认值 | 描述 | | 名称 | 默认值 | 描述 |
| --------- | ------ | ----------------- | | --------- | ------ | ---------------- |
| UNKNOWN | 0 | 未知格式。 | | UNKNOWN | 0 | 未知格式。 |
| RGBA_8888 | 3 | 格式为RGBA_8888。 |
| RGB_565 | 2 | 格式为RGB_565。 | | RGB_565 | 2 | 格式为RGB_565。 |
| RGBA_8888 | 3 | 格式为RGBA_8888。 |
## AlphaType<sup>9+</sup> ## AlphaType<sup>9+</sup>
...@@ -2129,16 +2134,16 @@ PixelMap的初始化选项。 ...@@ -2129,16 +2134,16 @@ PixelMap的初始化选项。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.Multimedia.Image.Core **系统能力:** 以下各项对应的系统能力均为SystemCapability.Multimedia.Image.Core
| 名称 | 默认值 | 说明 | | 名称 | 默认值 | 说明 |
| ----------------- | ----------------- | ------------------- | | ----------------- | ----------------------- | ------------------------ |
| BITS_PER_SAMPLE | "BitsPerSample" | 每个像素比特数。 | | BITS_PER_SAMPLE | "BitsPerSample" | 每个像素比特数。 |
| ORIENTATION | "Orientation" | 图片方向。 | | ORIENTATION | "Orientation" | 图片方向。 |
| IMAGE_LENGTH | "ImageLength" | 图片长度。 | | IMAGE_LENGTH | "ImageLength" | 图片长度。 |
| IMAGE_WIDTH | "ImageWidth" | 图片宽度。 | | IMAGE_WIDTH | "ImageWidth" | 图片宽度。 |
| GPS_LATITUDE | "GPSLatitude" | 图片纬度。 | | GPS_LATITUDE | "GPSLatitude" | 图片纬度。 |
| GPS_LONGITUDE | "GPSLongitude" | 图片经度。 | | GPS_LONGITUDE | "GPSLongitude" | 图片经度。 |
| GPS_LATITUDE_REF | "GPSLatitudeRef" | 纬度引用,例如N或S。| | GPS_LATITUDE_REF | "GPSLatitudeRef" | 纬度引用,例如N或S。 |
| GPS_LONGITUDE_REF | "GPSLongitudeRef" | 经度引用,例如W或E。| | GPS_LONGITUDE_REF | "GPSLongitudeRef" | 经度引用,例如W或E。 |
## ImageFormat<sup>9+</sup> ## ImageFormat<sup>9+</sup>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册