Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
eb9f7d44
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
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看板
未验证
提交
eb9f7d44
编写于
7月 12, 2022
作者:
O
openharmony_ci
提交者:
Gitee
7月 12, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6647 image文档接口新增
Merge pull request !6647 from 徐蕊w/master
上级
224b84a6
f759e4e2
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
403 addition
and
19 deletion
+403
-19
zh-cn/application-dev/reference/apis/js-apis-image.md
zh-cn/application-dev/reference/apis/js-apis-image.md
+403
-19
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-image.md
浏览文件 @
eb9f7d44
...
@@ -36,7 +36,7 @@ createPixelMap(colors: ArrayBuffer, options: InitializationOptions): Promise\<Pi
...
@@ -36,7 +36,7 @@ createPixelMap(colors: ArrayBuffer, options: InitializationOptions): Promise\<Pi
```
js
```
js
const
color
=
new
ArrayBuffer
(
96
);
const
color
=
new
ArrayBuffer
(
96
);
let
bufferArr
=
new
U
ni
t8Array
(
color
);
let
bufferArr
=
new
U
in
t8Array
(
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
)
image
.
createPixelMap
(
color
,
opts
)
.
then
((
pixelmap
)
=>
{
.
then
((
pixelmap
)
=>
{
...
@@ -63,7 +63,7 @@ createPixelMap(colors: ArrayBuffer, options: InitializationOptions, callback: As
...
@@ -63,7 +63,7 @@ createPixelMap(colors: ArrayBuffer, options: InitializationOptions, callback: As
```
js
```
js
const
color
=
new
ArrayBuffer
(
96
);
const
color
=
new
ArrayBuffer
(
96
);
let
bufferArr
=
new
U
ni
t8Array
(
color
);
let
bufferArr
=
new
U
in
t8Array
(
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
,
(
pixelmap
)
=>
{
})
})
...
@@ -190,7 +190,7 @@ readPixels(area: PositionArea, callback: AsyncCallback\<void>): void
...
@@ -190,7 +190,7 @@ readPixels(area: PositionArea, callback: AsyncCallback\<void>): void
```
js
```
js
const
color
=
new
ArrayBuffer
(
96
);
const
color
=
new
ArrayBuffer
(
96
);
let
bufferArr
=
new
U
ni
t8Array
(
color
);
let
bufferArr
=
new
U
in
t8Array
(
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
,
(
err
,
pixelmap
)
=>
{
image
.
createPixelMap
(
color
,
opts
,
(
err
,
pixelmap
)
=>
{
if
(
pixelmap
==
undefined
){
if
(
pixelmap
==
undefined
){
...
@@ -231,7 +231,7 @@ writePixels(area: PositionArea): Promise\<void>
...
@@ -231,7 +231,7 @@ writePixels(area: PositionArea): Promise\<void>
```
js
```
js
const
color
=
new
ArrayBuffer
(
96
);
const
color
=
new
ArrayBuffer
(
96
);
let
bufferArr
=
new
U
ni
t8Array
(
color
);
let
bufferArr
=
new
U
in
t8Array
(
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
)
image
.
createPixelMap
(
color
,
opts
)
.
then
(
pixelmap
=>
{
.
then
(
pixelmap
=>
{
...
@@ -281,7 +281,7 @@ writePixels(area: PositionArea, callback: AsyncCallback\<void>): void
...
@@ -281,7 +281,7 @@ writePixels(area: PositionArea, callback: AsyncCallback\<void>): void
```
js
```
js
const
area
=
new
ArrayBuffer
(
400
);
const
area
=
new
ArrayBuffer
(
400
);
pixelmap
.
writePixels
(
area
,
(
error
)
=>
{
pixelmap
.
writePixels
(
area
,
(
error
)
=>
{
if
(
error
!=
undefined
)
{
if
(
error
!=
undefined
)
{
console
.
info
(
'
Failed to write pixelmap into the specified area.
'
);
console
.
info
(
'
Failed to write pixelmap into the specified area.
'
);
}
else
{
}
else
{
const
readArea
=
{
const
readArea
=
{
...
@@ -319,7 +319,7 @@ writeBufferToPixels(src: ArrayBuffer): Promise\<void>
...
@@ -319,7 +319,7 @@ writeBufferToPixels(src: ArrayBuffer): Promise\<void>
```
js
```
js
const
color
=
new
ArrayBuffer
(
96
);
const
color
=
new
ArrayBuffer
(
96
);
const
pixelMap
=
new
ArrayBuffer
(
400
);
const
pixelMap
=
new
ArrayBuffer
(
400
);
let
bufferArr
=
new
U
ni
t8Array
(
color
);
let
bufferArr
=
new
U
in
t8Array
(
color
);
pixelMap
.
writeBufferToPixels
(
color
).
then
(()
=>
{
pixelMap
.
writeBufferToPixels
(
color
).
then
(()
=>
{
console
.
log
(
"
Succeeded in writing data from a buffer to a PixelMap.
"
);
console
.
log
(
"
Succeeded in writing data from a buffer to a PixelMap.
"
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
...
@@ -345,9 +345,9 @@ writeBufferToPixels(src: ArrayBuffer, callback: AsyncCallback\<void>): void
...
@@ -345,9 +345,9 @@ writeBufferToPixels(src: ArrayBuffer, callback: AsyncCallback\<void>): void
**示例:**
**示例:**
```
js
```
js
const
color
=
new
ArrayBuffer
(
96
);
\
const
color
=
new
ArrayBuffer
(
96
);
const
pixelMap
=
new
ArrayBuffer
(
400
);
const
pixelMap
=
new
ArrayBuffer
(
400
);
let
bufferArr
=
new
U
ni
t8Array
(
color
);
let
bufferArr
=
new
U
in
t8Array
(
color
);
pixelMap
.
writeBufferToPixels
(
color
,
function
(
err
)
{
pixelMap
.
writeBufferToPixels
(
color
,
function
(
err
)
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
"
Failed to write data from a buffer to a PixelMap.
"
);
console
.
error
(
"
Failed to write data from a buffer to a PixelMap.
"
);
...
@@ -401,7 +401,7 @@ getImageInfo(callback: AsyncCallback\<ImageInfo>): void
...
@@ -401,7 +401,7 @@ getImageInfo(callback: AsyncCallback\<ImageInfo>): void
```
js
```
js
pixelmap
.
getImageInfo
((
imageInfo
)
=>
{
pixelmap
.
getImageInfo
((
imageInfo
)
=>
{
console
.
log
(
"
Succeeded in obtaining the image pixel map information.
.
"
);
console
.
log
(
"
Succeeded in obtaining the image pixel map information.
"
);
})
})
```
```
...
@@ -423,7 +423,7 @@ getBytesNumberPerRow(): number
...
@@ -423,7 +423,7 @@ getBytesNumberPerRow(): number
```
js
```
js
const
color
=
new
ArrayBuffer
(
96
);
const
color
=
new
ArrayBuffer
(
96
);
let
bufferArr
=
new
U
ni
t8Array
(
color
);
let
bufferArr
=
new
U
in
t8Array
(
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
,
(
err
,
pixelmap
)
=>
{
image
.
createPixelMap
(
color
,
opts
,
(
err
,
pixelmap
)
=>
{
let
rowCount
=
pixelmap
.
getBytesNumberPerRow
();
let
rowCount
=
pixelmap
.
getBytesNumberPerRow
();
...
@@ -450,6 +450,391 @@ getPixelBytesNumber(): number
...
@@ -450,6 +450,391 @@ getPixelBytesNumber(): number
let
pixelBytesNumber
=
pixelmap
.
getPixelBytesNumber
();
let
pixelBytesNumber
=
pixelmap
.
getPixelBytesNumber
();
```
```
### getDensity<sup>9+</sup>
getDensity():number
获取当前图像像素的密度。
**系统能力:**
SystemCapability.Multimedia.Image.Core
**返回值:**
| 类型 | 说明 |
| ------ | --------------- |
| number | 图像像素的密度。|
**示例:**
```
js
let
getDensity
=
pixelmap
.
getDensity
();
```
### opacity<sup>9+</sup>
opacity(rate: number, callback: AsyncCallback
\<
void>): void
通过设置透明比率来让PixelMap达到对应的透明效果,使用callback形式返回。
**系统能力:**
SystemCapability.Multimedia.Image.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------------------- | ---- | ------------------------------ |
| rate | number | 是 | 透明比率的值,取值范围:0-1。 |
| callback | AsyncCallback
\<
void> | 是 | 获取回调,失败时返回错误信息。 |
**示例:**
```
js
async
function
()
{
await
pixelMap
.
opacity
(
0.5
);
}
```
### opacity<sup>9+</sup>
opacity(rate: number): Promise
\<
void>
通过设置透明比率来让PixelMap达到对应的透明效果,使用Promise形式返回。
**系统能力:**
SystemCapability.Multimedia.Image.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------ | ------ | ---- | --------------------------- |
| rate | number | 是 | 透明比率的值,取值范围:0-1。|
**返回值:**
| 类型 | 说明 |
| -------------- | ----------------------------------------------- |
| Promise
\<
void> | Promise实例,用于获取结果,失败时返回错误信息。 |
**示例:**
```
js
async
function
()
{
await
pixelMap
.
opacity
(
0.5
);
}
```
### createAlphaPixelmap<sup>9+</sup>
createAlphaPixelmap(): Promise
\<
PixelMap>
根据Alpha通道的信息,来生成一个仅包含Alpha通道信息的pixelmap,可用于阴影效果,使用Promise形式返回。
**系统能力:**
SystemCapability.Multimedia.Image.Core
**返回值:**
| 类型 | 说明 |
| -------------------------------- | --------------------------- |
| Promise
\<
[
PixelMap
](
#pixelmap7
)
> | Promise实例,返回pixelmap。 |
**示例:**
```
js
pixelMap
.
createAlphaPixelmap
(
async
(
err
,
alphaPixelMap
)
=>
{
if
(
alphaPixelMap
==
undefined
)
{
console
.
info
(
'
Failed to obtain new pixel map.
'
);
}
else
{
console
.
info
(
'
Succeed in obtaining new pixel map.
'
);
}
})
```
### createAlphaPixelmap<sup>9+</sup>
createAlphaPixelmap(callback: AsyncCallback
\<
PixelMap>): void
根据Alpha通道的信息,来生成一个仅包含Alpha通道信息的pixelmap,可用于阴影效果,使用callback形式返回。
**系统能力:**
SystemCapability.Multimedia.Image.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------------------------ | ---- | ------------------------ |
| callback | AsyncCallback
\<
PixelMap> | 是 | 获取回调,异步返回结果。 |
**示例:**
```
js
let
pixelMap
=
await
imageSource
.
createPixelMap
();
if
(
pixelMap
!=
undefined
)
{
pixelMap
.
createAlphaPixelmap
(
async
(
err
,
alphaPixelMap
)
=>
{
console
.
info
(
'
Failed to obtain new pixel map.
'
);
})
}
else
{
console
.
info
(
'
Succeed in obtaining new pixel map.
'
);
}
```
### scale<sup>9+</sup>
scale(x: number, y: number, callback: AsyncCallback
\<
void>): void
根据输入的宽高对图片进行缩放,使用callback形式返回。
**系统能力:**
SystemCapability.Multimedia.Image.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------------------- | ---- | ------------------------------- |
| x | number | 是 | 宽度的缩放值,其值为输入的倍数。|
| y | number | 是 | 高度的缩放值,其值为输入的倍数。|
| callback | AsyncCallback
\<
void> | 是 | 获取回调,失败时返回错误信息。 |
**示例:**
```
js
async
function
()
{
await
pixelMap
.
scale
(
2.0
,
1.0
);
}
```
### scale<sup>9+</sup>
scale(x: number, y: number): Promise
\<
void>
根据输入的宽高对图片进行缩放,使用Promise形式返回。
**系统能力:**
SystemCapability.Multimedia.Image.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------ | ------ | ---- | ------------------------------- |
| x | number | 是 | 宽度的缩放值,其值为输入的倍数。|
| y | number | 是 | 高度的缩放值,其值为输入的倍数。|
**返回值:**
| 类型 | 说明 |
| -------------- | --------------------------- |
| Promise
\<
void> | Promise实例,异步返回结果。 |
**示例:**
```
js
async
function
()
{
await
pixelMap
.
scale
(
2.0
,
1.0
);
}
```
### translate<sup>9+</sup>
translate(x: number, y: number, callback: AsyncCallback
\<
void>): void
根据输入的坐标对图片进行位置变换,使用callback形式返回。
**系统能力:**
SystemCapability.Multimedia.Image.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------------------- | ---- | ----------------------------- |
| x | number | 是 | 区域横坐标。 |
| y | number | 是 | 区域纵坐标。 |
| callback | AsyncCallback
\<
void> | 是 | 获取回调,失败时返回错误信息。|
**示例:**
```
js
async
function
()
{
await
pixelMap
.
translate
(
3.0
,
1.0
);
}
```
### translate<sup>9+</sup>
translate(x: number, y: number): Promise
\<
void>
根据输入的坐标对图片进行位置变换,使用Promise形式返回。
**系统能力:**
SystemCapability.Multimedia.Image.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------ | ------ | ---- | ----------- |
| x | number | 是 | 区域横坐标。|
| y | number | 是 | 区域纵坐标。|
**返回值:**
| 类型 | 说明 |
| -------------- | --------------------------- |
| Promise
\<
void> | Promise实例,异步返回结果。 |
**示例:**
```
js
async
function
()
{
await
pixelMap
.
translate
(
3.0
,
1.0
);
}
```
### rotate<sup>9+</sup>
rotate(angle: number, callback: AsyncCallback
\<
void>): void
根据输入的角度对图片进行旋转,使用callback形式返回。
**系统能力:**
SystemCapability.Multimedia.Image.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------------------- | ---- | ----------------------------- |
| angle | number | 是 | 图片旋转的角度。 |
| callback | AsyncCallback
\<
void> | 是 | 获取回调,失败时返回错误信息。|
**示例:**
```
js
async
function
()
{
await
pixelMap
.
rotate
(
90.0
);
}
```
### rotate<sup>9+</sup>
rotate(angle: number): Promise
\<
void>
根据输入的角度对图片进行旋转,使用Promise形式返回。
**系统能力:**
SystemCapability.Multimedia.Image.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------ | ------ | ---- | ----------------------------- |
| angle | number | 是 | 图片旋转的角度。 |
**返回值:**
| 类型 | 说明 |
| -------------- | --------------------------- |
| Promise
\<
void> | Promise实例,异步返回结果。 |
**示例:**
```
js
async
function
()
{
await
pixelMap
.
rotate
(
90.0
);
}
```
### flip<sup>9+</sup>
flip(horizontal: boolean, vertical: boolean, callback: AsyncCallback
\<
void>): void
根据输入的条件对图片进行翻转,使用callback形式返回。
**系统能力:**
SystemCapability.Multimedia.Image.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ---------- | -------------------- | ---- | ----------------------------- |
| horizontal | boolean | 是 | 水平翻转。 |
| vertical | boolean | 是 | 垂直翻转。 |
| callback | AsyncCallback
\<
void> | 是 | 获取回调,失败时返回错误信息。|
**示例:**
```
js
async
function
()
{
await
pixelMap
.
flip
(
false
,
true
);
}
```
### flip<sup>9+</sup>
flip(horizontal: boolean, vertical: boolean): Promise
\<
void>
根据输入的条件对图片进行翻转,使用Promise形式返回。
**系统能力:**
SystemCapability.Multimedia.Image.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ---------- | ------- | ---- | --------- |
| horizontal | boolean | 是 | 水平翻转。|
| vertical | boolean | 是 | 垂直翻转。|
**返回值:**
| 类型 | 说明 |
| -------------- | --------------------------- |
| Promise
\<
void> | Promise实例,异步返回结果。 |
**示例:**
```
js
async
function
()
{
await
pixelMap
.
flip
(
false
,
true
);
}
```
### crop<sup>9+</sup>
crop(region: Region, callback: AsyncCallback
\<
void>): void
根据输入的尺寸对图片进行裁剪,使用callback形式返回。
**系统能力:**
SystemCapability.Multimedia.Image.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------------------- | ---- | ----------------------------- |
| region |
[
Region
](
#region7
)
| 是 | 裁剪的尺寸。 |
| callback | AsyncCallback
\<
void> | 是 | 获取回调,失败时返回错误信息。|
**示例:**
```
js
async
function
()
{
await
pixelMap
.
crop
(
3
x3
);
}
```
### crop<sup>9+</sup>
crop(region: Region): Promise
\<
void>
根据输入的尺寸对图片进行裁剪,使用Promise形式返回。
**系统能力:**
SystemCapability.Multimedia.Image.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------ | ------------------ | ---- | ----------- |
| region |
[
Region
](
#region7
)
| 是 | 裁剪的尺寸。|
**返回值:**
| 类型 | 说明 |
| -------------- | --------------------------- |
| Promise
\<
void> | Promise实例,异步返回结果。 |
**示例:**
```
js
async
function
()
{
await
pixelMap
.
crop
(
3
x3
);
}
```
### release<sup>7+</sup>
### release<sup>7+</sup>
release():Promise
\<
void>
release():Promise
\<
void>
...
@@ -460,15 +845,15 @@ release():Promise\<void>
...
@@ -460,15 +845,15 @@ release():Promise\<void>
**返回值:**
**返回值:**
| 类型 | 说明 |
| 类型 | 说明
|
| -------------- | ------------------ |
| -------------- | ------------------
-------------
|
| Promise
\<
void> | 异步返回释放结果。 |
| Promise
\<
void> |
Promise实例,
异步返回释放结果。 |
**示例:**
**示例:**
```
js
```
js
const
color
=
new
ArrayBuffer
(
96
);
const
color
=
new
ArrayBuffer
(
96
);
let
bufferArr
=
new
U
ni
t8Array
(
color
);
let
bufferArr
=
new
U
in
t8Array
(
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
,
(
pixelmap
)
=>
{
pixelmap
.
release
().
then
(()
=>
{
pixelmap
.
release
().
then
(()
=>
{
...
@@ -497,7 +882,7 @@ release(callback: AsyncCallback\<void>): void
...
@@ -497,7 +882,7 @@ release(callback: AsyncCallback\<void>): void
```
js
```
js
const
color
=
new
ArrayBuffer
(
96
);
const
color
=
new
ArrayBuffer
(
96
);
let
bufferArr
=
new
U
ni
t8Array
(
color
);
let
bufferArr
=
new
U
in
t8Array
(
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
,
(
pixelmap
)
=>
{
pixelmap
.
release
().
then
(()
=>
{
pixelmap
.
release
().
then
(()
=>
{
...
@@ -579,7 +964,7 @@ createImageSource(buf: ArrayBuffer): ImageSource
...
@@ -579,7 +964,7 @@ createImageSource(buf: ArrayBuffer): ImageSource
```
js
```
js
const
buf
=
new
ArrayBuffer
(
96
);
const
buf
=
new
ArrayBuffer
(
96
);
image
.
createImageSource
(
buf
,
()
=>
{
})
const
imageSourceApi
=
image
.
createImageSource
(
buf
);
```
```
## image.CreateIncrementalSource<sup>9+</sup>
## image.CreateIncrementalSource<sup>9+</sup>
...
@@ -607,7 +992,7 @@ function CreateIncrementalSource(buf: ArrayBuffer, options?: SourceOptions): Ima
...
@@ -607,7 +992,7 @@ function CreateIncrementalSource(buf: ArrayBuffer, options?: SourceOptions): Ima
```
js
```
js
const
buf
=
new
ArrayBuffer
(
96
);
const
buf
=
new
ArrayBuffer
(
96
);
const
imageSourceApi
=
image
.
c
reateIncrementalSource
(
buf
);
const
imageSourceApi
=
image
.
C
reateIncrementalSource
(
buf
);
```
```
## ImageSource
## ImageSource
...
@@ -1615,7 +2000,7 @@ img.release().then(() =>{
...
@@ -1615,7 +2000,7 @@ img.release().then(() =>{
| pixels | ArrayBuffer | 是 | 否 | 像素。 |
| pixels | ArrayBuffer | 是 | 否 | 像素。 |
| offset | number | 是 | 否 | 偏移量。 |
| offset | number | 是 | 否 | 偏移量。 |
| stride | number | 是 | 否 | 像素间距,stride >= region.size.width
*
4。 |
| stride | number | 是 | 否 | 像素间距,stride >= region.size.width
*
4。 |
| region |
[
Region
](
#region7
)
| 是 | 否 | 区域,按照区域读写。写入的区域宽度加X坐标不能大于原图的宽度,写入的区域高度加Y坐标不能大于原图的高度 |
| region |
[
Region
](
#region7
)
| 是 | 否 | 区域,按照区域读写。写入的区域宽度加X坐标不能大于原图的宽度,写入的区域高度加Y坐标不能大于原图的高度
。
|
## ImageInfo
## ImageInfo
...
@@ -1796,7 +2181,6 @@ PixelMap的初始化选项。
...
@@ -1796,7 +2181,6 @@ PixelMap的初始化选项。
编译错误返回的响应码。
编译错误返回的响应码。
| 名称 | 值 | 说明 |
| 名称 | 值 | 说明 |
| ----------------------------------- | -------- | --------------------------------------------------- |
| ----------------------------------- | -------- | --------------------------------------------------- |
| ERR_MEDIA_INVALID_VALUE | -1 | 无效大小。 |
| ERR_MEDIA_INVALID_VALUE | -1 | 无效大小。 |
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录