未验证 提交 68aa708d 编写于 作者: 刘关鹏 提交者: Gitee

update zh-cn/application-dev/media/image-encoding.md.

Signed-off-by: N刘关鹏 <liuguanpeng1@huawei.com>
上级 a007a400
......@@ -30,7 +30,7 @@
方法一:通过PixelMap进行编码。
```ts
imagePackerApi.packing(pixelMap, packOpts).then( data => {
imagePackerApi.packing(pixelMap, packOpts).then( (data : ArrayBuffer) => {
// data 为打包获取到的文件流,写入文件保存即可得到一张图片
}).catch(error => {
console.error('Failed to pack the image. And the error is: ' + error);
......@@ -40,7 +40,7 @@
方法二:通过imageSource进行编码。
```ts
imagePackerApi.packing(imageSource, packOpts).then( data => {
imagePackerApi.packing(imageSource, packOpts).then( (data : ArrayBuffer) => {
// data 为打包获取到的文件流,写入文件保存即可得到一张图片
}).catch(error => {
console.error('Failed to pack the image. And the error is: ' + error);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册