From fe80ce7a3488d130e1a2f4a09ae75c172e67b7a8 Mon Sep 17 00:00:00 2001 From: tsm <2418639820@qq.com> Date: Tue, 11 Jun 2024 15:19:54 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=8D=E9=87=87=E6=A0=B7=E6=A1=88=E4=BE=8B?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tsm <2418639820@qq.com> --- entry/src/main/ets/pages/downsamplingPage.ets | 116 +++++++++--------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/entry/src/main/ets/pages/downsamplingPage.ets b/entry/src/main/ets/pages/downsamplingPage.ets index 7465a87..7fea82e 100644 --- a/entry/src/main/ets/pages/downsamplingPage.ets +++ b/entry/src/main/ets/pages/downsamplingPage.ets @@ -131,16 +131,16 @@ struct Index { this.transformSquare1(this.url); }); - Button('gif') - .onClick(() => { - this.transformSquare1(this.url); - - }); - Button('webp') - .onClick(() => { - this.transformSquare1(this.url); - - }); + // Button('gif') + // .onClick(() => { + // this.transformSquare1(this.url); + // + // }); + // Button('webp') + // .onClick(() => { + // this.transformSquare1(this.url); + // + // }); }.margin({ top: 20, bottom: 20 }) Text("原图字节大小:" + this.originalBytesNumber) @@ -199,26 +199,26 @@ struct Index { downsampling: new fitter() } }); - Button('gif') - .onClick(() => { - // this.transformSquare2(this.url); - this.imageKnifeOption = { - loadSrc: gifUrl, - placeholderSrc: $r('app.media.icon_loading'), - errorholderSrc: $r('app.media.icon_failed'), - downsampling: new fitter() - } - }); - Button('webp') - .onClick(() => { - // this.transformSquare2(this.url); - this.imageKnifeOption = { - loadSrc: webpUrl, - placeholderSrc: $r('app.media.icon_loading'), - errorholderSrc: $r('app.media.icon_failed'), - downsampling: new fitter() - } - }); + // Button('gif') + // .onClick(() => { + // // this.transformSquare2(this.url); + // this.imageKnifeOption = { + // loadSrc: gifUrl, + // placeholderSrc: $r('app.media.icon_loading'), + // errorholderSrc: $r('app.media.icon_failed'), + // downsampling: new fitter() + // } + // }); + // Button('webp') + // .onClick(() => { + // // this.transformSquare2(this.url); + // this.imageKnifeOption = { + // loadSrc: webpUrl, + // placeholderSrc: $r('app.media.icon_loading'), + // errorholderSrc: $r('app.media.icon_failed'), + // downsampling: new fitter() + // } + // }); }.margin({ top: 20, bottom: 20 }) Text("降采样字节大小:" + this.bytesNumber) @@ -259,16 +259,16 @@ struct Index { this.transformSquare1(jpgUrl); }); - Button('gif') - .onClick(() => { - this.transformSquare1(gifUrl); - - }); - Button('webp') - .onClick(() => { - this.transformSquare1(webpUrl); - - }); + // Button('gif') + // .onClick(() => { + // this.transformSquare1(gifUrl); + // + // }); + // Button('webp') + // .onClick(() => { + // this.transformSquare1(webpUrl); + // + // }); }.margin({ top: 20, bottom: 20 }) Text("原图字节大小:" + this.originalBytesNumber) @@ -323,24 +323,24 @@ struct Index { errorholderSrc: $r('app.media.icon_failed'), } }); - Button('gif') - .onClick(() => { - // this.transformSquare2(gifUrl); - this.imageKnifeOption = { - loadSrc: gifUrl, - placeholderSrc: $r('app.media.icon_loading'), - errorholderSrc: $r('app.media.icon_failed'), - } - }); - Button('webp') - .onClick(() => { - // this.transformSquare2(webpUrl); - this.imageKnifeOption = { - loadSrc: webpUrl, - placeholderSrc: $r('app.media.icon_loading'), - errorholderSrc: $r('app.media.icon_failed'), - } - }); + // Button('gif') + // .onClick(() => { + // // this.transformSquare2(gifUrl); + // this.imageKnifeOption = { + // loadSrc: gifUrl, + // placeholderSrc: $r('app.media.icon_loading'), + // errorholderSrc: $r('app.media.icon_failed'), + // } + // }); + // Button('webp') + // .onClick(() => { + // // this.transformSquare2(webpUrl); + // this.imageKnifeOption = { + // loadSrc: webpUrl, + // placeholderSrc: $r('app.media.icon_loading'), + // errorholderSrc: $r('app.media.icon_failed'), + // } + // }); }.margin({ top: 20, bottom: 20 }) Text("降采样字节大小:" + this.bytesNumber)