diff --git a/library/src/main/ets/components/imageknife/Downsampling/Downsampler.ets b/library/src/main/ets/components/imageknife/Downsampling/Downsampler.ets index 202ee00..4624e6a 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"); }