From 74a574532abf022115c247e3624433d314269b37 Mon Sep 17 00:00:00 2001 From: tsm <2418639820@qq.com> Date: Wed, 22 May 2024 15:46:54 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=8D=E9=87=87=E6=A0=B7=E9=80=82=E9=85=8D3.?= =?UTF-8?q?x?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tsm <2418639820@qq.com> --- library/src/main/ets/components/ImageKnifeComponent.ets | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/library/src/main/ets/components/ImageKnifeComponent.ets b/library/src/main/ets/components/ImageKnifeComponent.ets index ec01324..71d3cdb 100644 --- a/library/src/main/ets/components/ImageKnifeComponent.ets +++ b/library/src/main/ets/components/ImageKnifeComponent.ets @@ -119,10 +119,8 @@ export struct ImageKnifeComponent { } this.pixelMap = pixelMap if (typeof this.pixelMap !== 'string') { - let info =await this.pixelMap.getImageInfo() - //图片自适应处理 if (this.imageKnifeOption.objectFit === ImageFit.Auto) { - + let info =await this.pixelMap.getImageInfo() this.adaptiveWidth = this.currentWidth this.adaptiveHeight = info.size.height * this.currentWidth / info.size.width