提交 d6037b78 编写于 作者: X xu-rui-w

示例修改

Signed-off-by: Nxu-rui-w <xurui101@huawei.com>
上级 c6ce6c95
...@@ -892,8 +892,6 @@ let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 } } ...@@ -892,8 +892,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(() => {
console.log('Succeeded in releasing pixelmap object.'); console.log('Succeeded in releasing pixelmap object.');
}).catch(error => {
console.log('Failed to release pixelmap object.');
}) })
}) })
``` ```
...@@ -1637,8 +1635,6 @@ let packOpts = { format:"image/jpeg", quality:98 } ...@@ -1637,8 +1635,6 @@ let packOpts = { format:"image/jpeg", quality:98 }
const pixelMapApi = new ArrayBuffer(400); const pixelMapApi = new ArrayBuffer(400);
imagePackerApi.packing(pixelMapApi, packOpts, data => { imagePackerApi.packing(pixelMapApi, packOpts, data => {
console.log('Succeeded in packing the image.'); console.log('Succeeded in packing the image.');
}).catch(error => {
console.log('Failed to pack the image.');
}) })
``` ```
...@@ -2070,8 +2066,6 @@ release(callback: AsyncCallback\<void>): void ...@@ -2070,8 +2066,6 @@ release(callback: AsyncCallback\<void>): void
```js ```js
img.release(() =>{ img.release(() =>{
console.log('release succeeded.'); console.log('release succeeded.');
}).catch(error => {
console.log('release failed.');
}) })
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册