demo报错修改
This commit is contained in:
parent
b9e527fc14
commit
dee9ddb176
|
@ -36,13 +36,13 @@ export class Downsampler {
|
||||||
orientedSourceHeight = sourceWidth;
|
orientedSourceHeight = sourceWidth;
|
||||||
}
|
}
|
||||||
/*安卓的模式*/
|
/*安卓的模式*/
|
||||||
let exactScaleFactor: number = FitCenter.getScaleFactor(orientedSourceWidth, orientedSourceHeight, targetWidth, targetHeight)
|
let exactScaleFactor: number = new FitCenter().getScaleFactor(orientedSourceWidth, orientedSourceHeight, targetWidth, targetHeight)
|
||||||
if (exactScaleFactor <= 0) {
|
if (exactScaleFactor <= 0) {
|
||||||
throw new Error("Cannot round with exactScaleFactor");
|
throw new Error("Cannot round with exactScaleFactor");
|
||||||
}
|
}
|
||||||
console.log('exactScaleFactor', 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) {
|
if (rounding == null) {
|
||||||
throw new Error("Cannot round with null rounding");
|
throw new Error("Cannot round with null rounding");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue