Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
8f7c43fb
D
Docs
项目概览
OpenHarmony
/
Docs
1 年多 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
8f7c43fb
编写于
9月 04, 2023
作者:
刘
刘关鹏
提交者:
Gitee
9月 04, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update zh-cn/application-dev/reference/apis/js-apis-image.md.
Signed-off-by:
N
刘关鹏
<
liuguanpeng1@huawei.com
>
上级
ed7f2822
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
11 deletion
+11
-11
zh-cn/application-dev/reference/apis/js-apis-image.md
zh-cn/application-dev/reference/apis/js-apis-image.md
+11
-11
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-image.md
浏览文件 @
8f7c43fb
...
...
@@ -1444,7 +1444,7 @@ getImageProperty(key:string, options?: GetImagePropertyOptions): Promise\<string
```
js
imageSourceApi
.
getImageProperty
(
"
BitsPerSample
"
)
.
then
(
data
=>
{
.
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\<string>): 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\<void>
```
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
<
image
.
PixelMap
>
=
imageSourceApi
.
createPixelMapList
(
decodeOpts
);
```
### createPixelMapList<sup>10+</sup>
...
...
@@ -1778,7 +1778,7 @@ createPixelMapList(callback: AsyncCallback<Array\<PixelMap>>): void
**示例:**
```
js
imageSourceApi
.
createPixelMapList
(
pixelmaplist
=>
{
imageSourceApi
.
createPixelMapList
(
(
pixelmaplist
:
Array
<
image
.
PixelMap
>
)
=>
{
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
<
image
.
PixelMap
>
)
=>
{
console
.
log
(
'
Succeeded in creating pixelmaplist object.
'
);
})
```
...
...
@@ -1857,7 +1857,7 @@ getDelayTimeList(callback: AsyncCallback<Array\<number>>): void;
**示例:**
```
js
imageSourceApi
.
getDelayTimeList
(
delayTimes
=>
{
imageSourceApi
.
getDelayTimeList
(
(
delayTimes
:
Array
<
number
>
)
=>
{
console
.
log
(
'
Succeeded in getting delay time.
'
);
});
```
...
...
@@ -1893,7 +1893,7 @@ getDelayTimeList(): Promise<Array\<number>>;
**示例:**
```
js
let
delayTimes
=
imageSourceApi
.
getDelayTimeList
();
let
delayTimes
:
Array
<
number
>
=
imageSourceApi
.
getDelayTimeList
();
```
### getFrameCount<sup>10+</sup>
...
...
@@ -1927,7 +1927,7 @@ getFrameCount(callback: AsyncCallback\<number>): void;
**示例:**
```
js
imageSourceApi
.
getFrameCount
(
frameCount
=>
{
imageSourceApi
.
getFrameCount
(
(
frameCount
:
number
)
=>
{
console
.
log
(
'
Succeeded in getting frame count.
'
);
});
```
...
...
@@ -1963,7 +1963,7 @@ getFrameCount(): Promise\<number>;
**示例:**
```
js
let
frameCount
=
imageSourceApi
.
getFrameCount
();
let
frameCount
:
number
=
imageSourceApi
.
getFrameCount
();
```
### release
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录