From 8f7c43fb575504c8350f45e832f4123008807827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=85=B3=E9=B9=8F?= Date: Mon, 4 Sep 2023 11:29:28 +0000 Subject: [PATCH] update zh-cn/application-dev/reference/apis/js-apis-image.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘关鹏 --- .../reference/apis/js-apis-image.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 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 e95f99ce40..db40343878 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-image.md +++ b/zh-cn/application-dev/reference/apis/js-apis-image.md @@ -1444,7 +1444,7 @@ getImageProperty(key:string, options?: GetImagePropertyOptions): Promise\ { + .then((data : string) => { console.log('Succeeded in getting the value of the specified attribute key of the image.'); }) ``` @@ -1467,7 +1467,7 @@ getImageProperty(key:string, callback: AsyncCallback\): void **示例:** ```js -imageSourceApi.getImageProperty("BitsPerSample",(error,data : string) => { +imageSourceApi.getImageProperty("BitsPerSample",(error, data : string) => { if(error) { console.log('Failed to get the value of the specified attribute key of the image.'); } else { @@ -1496,7 +1496,7 @@ getImageProperty(key:string, options: GetImagePropertyOptions, callback: AsyncCa ```js let property : image.GetImagePropertyOptions = { index: 0, defaultValue: '9999' } -imageSourceApi.getImageProperty("BitsPerSample",property,(error,data) => { +imageSourceApi.getImageProperty("BitsPerSample",property,(error, data : string) => { if(error) { console.log('Failed to get the value of the specified attribute key of the image.'); } else { @@ -1530,7 +1530,7 @@ modifyImageProperty(key: string, value: string): Promise\ ```js imageSourceApi.modifyImageProperty("ImageWidth", "120").then(() => { - const w = imageSourceApi.getImageProperty("ImageWidth") + const w : string = imageSourceApi.getImageProperty("ImageWidth"); console.info('w', w); }) ``` @@ -1746,7 +1746,7 @@ let decodeOpts : image.DecodingOptions = { desiredPixelFormat: 3, index: 0, }; -let pixelmaplist = imageSourceApi.createPixelMapList(decodeOpts); +let pixelmaplist : Array = imageSourceApi.createPixelMapList(decodeOpts); ``` ### createPixelMapList10+ @@ -1778,7 +1778,7 @@ createPixelMapList(callback: AsyncCallback>): void **示例:** ```js -imageSourceApi.createPixelMapList( pixelmaplist => { +imageSourceApi.createPixelMapList( (pixelmaplist : Array) => { console.info('Succeeded in creating pixelmaplist object.'); }) ``` @@ -1821,7 +1821,7 @@ let decodeOpts : image.DecodingOptions = { desiredPixelFormat: 3, index: 0, }; -imageSourceApi.createPixelMapList(decodeOpts, pixelmaplist => { +imageSourceApi.createPixelMapList(decodeOpts, (pixelmaplist : Array) => { console.log('Succeeded in creating pixelmaplist object.'); }) ``` @@ -1857,7 +1857,7 @@ getDelayTimeList(callback: AsyncCallback>): void; **示例:** ```js -imageSourceApi.getDelayTimeList( delayTimes => { +imageSourceApi.getDelayTimeList( (delayTimes : Array) => { console.log('Succeeded in getting delay time.'); }); ``` @@ -1893,7 +1893,7 @@ getDelayTimeList(): Promise>; **示例:** ```js -let delayTimes = imageSourceApi.getDelayTimeList(); +let delayTimes : Array = imageSourceApi.getDelayTimeList(); ``` ### getFrameCount10+ @@ -1927,7 +1927,7 @@ getFrameCount(callback: AsyncCallback\): void; **示例:** ```js -imageSourceApi.getFrameCount( frameCount => { +imageSourceApi.getFrameCount( (frameCount : number) => { console.log('Succeeded in getting frame count.'); }); ``` @@ -1963,7 +1963,7 @@ getFrameCount(): Promise\; **示例:** ```js -let frameCount = imageSourceApi.getFrameCount(); +let frameCount : number = imageSourceApi.getFrameCount(); ``` ### release -- GitLab