1.PngjTestCasePage readPngImageInfo callback first parameter add 'sender'

2.remove console.log print out arraybuffer

Signed-off-by: zhoulisheng <635547767@qq.com>
This commit is contained in:
zhoulisheng 2022-03-25 15:45:10 +08:00
parent ff30e3d2e9
commit ba8fa48c19
1 changed files with 2 additions and 3 deletions

View File

@ -63,7 +63,7 @@ struct PngjTestCasePage {
Button('测试readPngImageInfo')
.onClick(() => {
let pngj = new Pngj();
pngj.readPngImageInfo(this.pngSource, (value) => {
pngj.readPngImageInfo(this.pngSource, (sender, value) => {
this.hint1 = JSON.stringify(value);
})
}).margin({ top: 5, left: 10 })
@ -107,7 +107,7 @@ struct PngjTestCasePage {
Button('测试readPngImageInfo')
.onClick(() => {
let pngj = new Pngj();
pngj.readPngImageInfo(this.pngSource, (value) => {
pngj.readPngImageInfo(this.pngSource, (sender, value) => {
this.hint1 = JSON.stringify(value);
})
}).margin({ top: 5, left: 10 })
@ -118,7 +118,6 @@ struct PngjTestCasePage {
this.pngSource = sender
this.hint2 = 'img with=' + value.width + ' img height=' + value.height
+ ' img depth=' + value.depth + ' img ctype=' + value.ctype
console.log('png data =' + value.data);
})
}).margin({ top: 5, left: 10 })
Button('测试writePngWithStringAsync')