未验证 提交 877ecb44 编写于 作者: 刘关鹏 提交者: Gitee

update zh-cn/application-dev/media/image-pixelmap-operation.md.

Signed-off-by: N刘关鹏 <liuguanpeng1@huawei.com>
上级 cd9548d4
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
3. 读取并修改目标区域像素数据,写回原图。 3. 读取并修改目标区域像素数据,写回原图。
```ts ```ts
import {BusinessError} from '@ohos.base'
// 场景一:将读取的整张图像像素数据结果写入ArrayBuffer中 // 场景一:将读取的整张图像像素数据结果写入ArrayBuffer中
const readBuffer = new ArrayBuffer(pixelBytesNumber); const readBuffer = new ArrayBuffer(pixelBytesNumber);
pixelMap.readPixelsToBuffer(readBuffer).then(() => { pixelMap.readPixelsToBuffer(readBuffer).then(() => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册