From 48e946706437edf9d0d07e5246d2bd6bca49d67e Mon Sep 17 00:00:00 2001 From: tsm <2418639820@qq.com> Date: Tue, 30 Apr 2024 00:22:21 +0800 Subject: [PATCH] =?UTF-8?q?demo=E6=8A=A5=E9=94=99=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ets/components/imageknife/Downsampling/Downsampler.ets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/src/main/ets/components/imageknife/Downsampling/Downsampler.ets b/library/src/main/ets/components/imageknife/Downsampling/Downsampler.ets index ab9eb3f..ccb7ed6 100644 --- a/library/src/main/ets/components/imageknife/Downsampling/Downsampler.ets +++ b/library/src/main/ets/components/imageknife/Downsampling/Downsampler.ets @@ -36,13 +36,13 @@ export class Downsampler { orientedSourceHeight = sourceWidth; } /*安卓的模式*/ - let exactScaleFactor: number = FitCenter.getScaleFactor(orientedSourceWidth, orientedSourceHeight, targetWidth, targetHeight) + let exactScaleFactor: number =new FitCenter().getScaleFactor(orientedSourceWidth, orientedSourceHeight, targetWidth, targetHeight) if (exactScaleFactor <= 0) { throw new Error("Cannot round with exactScaleFactor"); } console.log('exactScaleFactor', exactScaleFactor) /*安卓的模式*/ - let rounding: SampleSizeRounding = CenterOutside.getSampleSizeRounding(orientedSourceWidth, orientedSourceHeight, targetWidth, targetHeight) + let rounding: SampleSizeRounding =new FitCenter().getSampleSizeRounding(orientedSourceWidth, orientedSourceHeight, targetWidth, targetHeight) if (rounding == null) { throw new Error("Cannot round with null rounding"); }