From fd6db436e0077811c5902003ceead8f0c86592a6 Mon Sep 17 00:00:00 2001 From: openharmony_ci <120357966@qq.com> Date: Tue, 8 Aug 2023 06:49:27 +0000 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E9=80=80=20'Pull=20Request=20!21757?= =?UTF-8?q?=20:=20=E5=9B=9E=E9=80=80=E6=8E=A5=E5=8F=A3=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reference/apis/js-apis-image.md | 123 +++++++++++++++++- 1 file changed, 117 insertions(+), 6 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 8ca3845b25..d1317dc79f 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-image.md +++ b/zh-cn/application-dev/reference/apis/js-apis-image.md @@ -892,6 +892,16 @@ getColorSpace(): colorSpaceManager.ColorSpaceManager | ----------------------------------- | ---------------- | | [colorSpaceManager.ColorSpaceManager](js-apis-colorSpaceManager.md#colorspacemanager) | 图像广色域信息。 | +**错误码:** + +以下错误码的详细介绍请参见文档底部图片错误码。 + +| 错误码ID | 错误信息 | +| ------- | --------------------------------------------| +| 62980101| If the image data abnormal | +| 62980103| If the image data unsupport | +| 62980115| If the image parameter invalid | + **示例:** ```js @@ -915,6 +925,15 @@ setColorSpace(colorSpace: colorSpaceManager.ColorSpaceManager): void | ---------- | ----------------------------------- | ---- | --------------- | | colorSpace | [colorSpaceManager.ColorSpaceManager](js-apis-colorSpaceManager.md#colorspacemanager) | 是 | 图像广色域信息。| +**错误码:** + +以下错误码的详细介绍请参见文档底部图片错误码。 + +| 错误码ID | 错误信息 | +| ------- | --------------------------------------------| +| 62980111| If the operation invalid | +| 62980115| If the image parameter invalid | + **示例:** ```js @@ -1694,6 +1713,18 @@ createPixelMapList(options?: DecodingOptions): Promise>; | -------- | ------------------------------------- | ---- | -------------------------- | | options | [DecodingOptions](#decodingoptions7) | 否 | 解码参数。 | +**错误码:** + +以下错误码的详细介绍请参见文档底部图片错误码。 + +| 错误码ID | 错误信息 | +| ------- | --------------------------------------------| +| 62980096| If the operation invalid | +| 62980103| If the image data unsupport | +| 62980110| If the image source data error | +| 62980111| If the image source data incomplete | +| 62980118| If the image plugin create failed | + **返回值:** | 类型 | 说明 | @@ -1728,6 +1759,18 @@ createPixelMapList(callback: AsyncCallback>): void | -------- | ------------------------------------- | ---- | -------------------------- | | callback | AsyncCallback> | 是 | 通过回调返回PixelMap数组。 | +**错误码:** + +以下错误码的详细介绍请参见文档底部图片错误码。 + +| 错误码ID | 错误信息 | +| ------- | --------------------------------------------| +| 62980096| If the operation invalid | +| 62980103| If the image data unsupport | +| 62980110| If the image source data error | +| 62980111| If the image source data incomplete | +| 62980118| If the image plugin create failed | + **示例:** ```js @@ -1751,6 +1794,18 @@ createPixelMapList(options: DecodingOptions, callback: AsyncCallback> | 是 | 通过回调返回PixelMap数组。 | +**错误码:** + +以下错误码的详细介绍请参见文档底部图片错误码。 + +| 错误码ID | 错误信息 | +| ------- | --------------------------------------------| +| 62980096| If the operation invalid | +| 62980103| If the image data unsupport | +| 62980110| If the image source data error | +| 62980111| If the image source data incomplete | +| 62980118| If the image plugin create failed | + **示例:** ```js @@ -1767,9 +1822,9 @@ imageSourceApi.createPixelMapList(decodeOpts, pixelmaplist => { }) ``` -### getDelayTime10+ +### getDelayTimeList10+ -getDelayTime(callback: AsyncCallback>): void; +getDelayTimeList(callback: AsyncCallback>): void; 获取图像延迟时间数组,使用callback形式返回结果。 @@ -1781,17 +1836,31 @@ getDelayTime(callback: AsyncCallback>): void; | -------- | -------------------- | ---- | ---------------------------------- | | callback | AsyncCallback> | 是 | 通过回调返回延迟时间数组。 | +**错误码:** + +以下错误码的详细介绍请参见文档底部图片错误码。 + +| 错误码ID | 错误信息 | +| ------- | --------------------------------------------| +| 62980096| If the operation invalid | +| 62980110| If the image source data error | +| 62980111| If the image source data incomplete | +| 62980113| If the image format unknown | +| 62980116| If the image decode failed | +| 62980118| If the image plugin create failed | +| 62980122| If the image decode head abnormal | + **示例:** ```js -imageSourceApi.getDelayTime( delayTimes => { +imageSourceApi.getDelayTimeList( delayTimes => { console.log('Succeeded in getting delay time.'); }); ``` -### getDelayTime10+ +### getDelayTimeList10+ -getDelayTime(): Promise>; +getDelayTimeList(): Promise>; 获取图像延迟时间数组,使用Promise形式返回结果。 @@ -1803,10 +1872,24 @@ getDelayTime(): Promise>; | -------------- | --------------------------- | | Promise> | Promise实例,异步返回延迟时间数组。 | +**错误码:** + +以下错误码的详细介绍请参见文档底部图片错误码。 + +| 错误码ID | 错误信息 | +| ------- | --------------------------------------------| +| 62980096| If the operation invalid | +| 62980110| If the image source data error | +| 62980111| If the image source data incomplete | +| 62980113| If the image format unknown | +| 62980116| If the image decode failed | +| 62980118| If the image plugin create failed | +| 62980122| If the image decode head abnormal | + **示例:** ```js -let delayTimes = imageSourceApi.getDelayTime(); +let delayTimes = imageSourceApi.getDelayTimeList(); ``` ### getFrameCount10+ @@ -1823,6 +1906,20 @@ getFrameCount(callback: AsyncCallback\): void; | -------- | -------------------- | ---- | ---------------------------------- | | callback | AsyncCallback\ | 是 | 通过回调返回图像帧数。 | +**错误码:** + +以下错误码的详细介绍请参见文档底部图片错误码。 + +| 错误码ID | 错误信息 | +| ------- | --------------------------------------------| +| 62980096| If the operation invalid | +| 62980110| If the image source data error | +| 62980111| If the image source data incomplete | +| 62980113| If the image format unknown | +| 62980116| If the image decode failed | +| 62980118| If the image plugin create failed | +| 62980122| If the image decode head abnormal | + **示例:** ```js @@ -1845,6 +1942,20 @@ getFrameCount(): Promise\; | -------------- | --------------------------- | | Promise\ | Promise实例,异步返回图像帧数。 | +**错误码:** + +以下错误码的详细介绍请参见文档底部图片错误码。 + +| 错误码ID | 错误信息 | +| ------- | --------------------------------------------| +| 62980096| If the operation invalid | +| 62980110| If the image source data error | +| 62980111| If the image source data incomplete | +| 62980113| If the image format unknown | +| 62980116| If the image decode failed | +| 62980118| If the image plugin create failed | +| 62980122| If the image decode head abnormal | + **示例:** ```js -- GitLab