From d28521fe3a998d643e20b9ab1dd4eea4995cc97e Mon Sep 17 00:00:00 2001 From: xu-rui-w Date: Thu, 7 Jul 2022 16:31:44 +0800 Subject: [PATCH] =?UTF-8?q?image=E6=96=87=E6=A1=A3=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xu-rui-w --- .../reference/apis/js-apis-image.md | 59 +++++++++---------- 1 file changed, 27 insertions(+), 32 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-image.md b/zh-cn/application-dev/reference/apis/js-apis-image.md index 6329f4ee4e..80845a120d 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-image.md +++ b/zh-cn/application-dev/reference/apis/js-apis-image.md @@ -15,7 +15,7 @@ createPixelMap(colors: ArrayBuffer, options: InitializationOptions): Promise\ { }) function CreateIncrementalSource(buf: ArrayBuffer, options?: SourceOptions): ImageSource -创建增量图片源。 +通过缓冲区以增量的方式创建图片源实例。 **系统能力:** SystemCapability.Multimedia.Image.ImageSource @@ -586,8 +592,8 @@ function CreateIncrementalSource(buf: ArrayBuffer, options?: SourceOptions): Ima | 参数名 | 类型 | 必填 | 说明 | | ------- | ------------------------------- | ---- | ------------------------------------ | -| buf | ArrayBuffer | 是 | 数组。 | -| options | [SourceOptions](#SourceOptions) | 是 | 图片属性,包括图片序号与默认属性值。 | +| buf | ArrayBuffer | 是 | 增量数据。 | +| options | [SourceOptions](#SourceOptions) | 否 | 图片属性,包括图片序号与默认属性值。 | **返回值:** @@ -782,9 +788,9 @@ imageSourceApi.getImageProperty("BitsPerSample",property,(error,data) => { ### modifyImageProperty9+ -modifyImageProperty(key: string, value: string): Promise +modifyImageProperty(key: string, value: string): Promise\ -修改属性的值。 +通过指定的键修改图片属性的值,使用Promise形式返回结果。 **系统能力:** SystemCapability.Multimedia.Image.ImageSource @@ -797,9 +803,9 @@ modifyImageProperty(key: string, value: string): Promise **返回值:** -| 类型 | 说明 | -| ---------------------- | ------------------------ | -| Promise<[void](#void)> | 返回修改后的图片属性值。 | +| 类型 | 说明 | +| -------------- | --------------------------- | +| Promise\ | Promise实例,异步返回结果。 | **示例:** @@ -815,7 +821,7 @@ imageSourceApi.modifyImageProperty("ImageWidth", "abc") modifyImageProperty(key: string, value: string, callback: AsyncCallback): void -修改属性的值,callback形式返回结果。 +通过指定的键修改图片属性的值,callback形式返回结果。 **系统能力:** SystemCapability.Multimedia.Image.ImageSource @@ -835,9 +841,9 @@ imageSourceApi.modifyImageProperty("ImageWidth", "abc",() => {}) ### updateData9+ -updateData(buf: ArrayBuffer, isFinished: boolean, value: number, length: number): Promise +updateData(buf: ArrayBuffer, isFinished: boolean, value: number, length: number): Promise\ -更新增量数据。 +更新增量数据,使用Promise形式返回结果。 **系统能力:** SystemCapability.Multimedia.Image.ImageSource @@ -852,9 +858,9 @@ updateData(buf: ArrayBuffer, isFinished: boolean, value: number, length: number) **返回值:** -| 类型 | 说明 | -| ---------------------- | ---------------------- | -| Promise<[void](#void)> | 返回更新后的增量数据。 | +| 类型 | 说明 | +| -------------- | -------------------------- | +| Promise\ | Promise实例,异步返回结果。| **示例:** @@ -866,11 +872,11 @@ imageSourceIncrementalSApi.updateData(array, false, 0, 10).then(data => { ``` -### updateData6+ +### updateData9+ updateData(buf: ArrayBuffer, isFinished: boolean, value: number, length: number, callback: AsyncCallback): void -更新增量数据。 +更新增量数据,callback形式返回结果。 **系统能力:** SystemCapability.Multimedia.Image.ImageSource @@ -1641,12 +1647,6 @@ img.release().then(() =>{ | UNKNOWN | 0 | 未知格式。 | | RGBA_8888 | 3 | 格式为RGBA_8888。 | | RGB_565 | 2 | 格式为RGB_565。 | -| BGRA_8888 | 4 | 格式为BGRA_8888。 | -| RGB_888 | 5 | 格式为RGB_888。 | -| ALPHA_8 | 6 | 格式为ALPHA_8。 | -| RGBA_F16 | 7 | 格式为RGBA_F16。 | -| NV21 | 8 | 格式为NV21。 | -| NV12 | 9 | 格式为NV12。 | ## AlphaType9+ @@ -1752,11 +1752,6 @@ PixelMap的初始化选项。 | GPS_LONGITUDE | "GPSLongitude" | 图片经度。 | | GPS_LATITUDE_REF | "GPSLatitudeRef" | 纬度引用,例如N或S。 | | GPS_LONGITUDE_REF | "GPSLongitudeRef" | 经度引用,例如W或E。 | -| DateTimeOriginal | "2022:06:02 15:51:35" | 拍摄时间。 | -| ExposureTime | "1/33 sec." | 曝光时间。 | -| SceneType | "Directly photographed" | 拍摄场景,例如直接拍摄。| -| ISOSpeedRatings | "400" | ISO 曝光度。 | -| FNumber | "f/1.8" | 光圈值。 | ## ImageFormat9+ -- GitLab