提交 Downsampler 类 报错修改
This commit is contained in:
parent
22f79c3588
commit
9c40365fc4
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* asdfasdfasdfasdfasdf*/
|
||||
import { CenterOutside, FitCenter, SampleSizeRounding } from './Downsamplestrategy';
|
||||
import { FileTypeutil } from '../../utits/Fitetypeutit';
|
||||
import { Request0ption } from '../../Requestoption';
|
||||
import { FileTypeUtil } from '../../utits/Fitetypeutit';
|
||||
import { RequestOption } from '../../Requestoption';
|
||||
let TAG = 'downsampling'
|
||||
export class Downsampler {
|
||||
calculateScaling(
|
||||
|
@ -37,9 +37,10 @@ export class Downsampler {
|
|||
let exactScaleFactor: number = FitCenter.getScaleFactor(orientedSourceWidth, orientedSourceHeight, targetWidth, targetHeight)
|
||||
if (exactScaleFactor <= 0) {
|
||||
throw new Error("Cannot round with exactScaleFactor");
|
||||
}
|
||||
console.log('exactScaleFactor', exactScaleFactor)
|
||||
/*安卓的模式*/
|
||||
let rounding: SampleSizeRounding = Center0utside.getSampleSizeRounding(orientedSourceWidth, orientedSourceHeight, targetWidth, targetHeight)
|
||||
let rounding: SampleSizeRounding = CenterOutside.getSampleSizeRounding(orientedSourceWidth, orientedSourceHeight, targetWidth, targetHeight)
|
||||
if (rounding == null) {
|
||||
throw new Error("Cannot round with null rounding");
|
||||
}
|
||||
|
@ -120,6 +121,7 @@ export class Downsampler {
|
|||
}
|
||||
isRotationRequired(degreesToRotate: number): boolean {
|
||||
return degreesToRotate == 90 || degreesToRotate == 270;
|
||||
}
|
||||
// isScaling(options: ESObject): boolean {
|
||||
// return options.inTargetDensity >0
|
||||
// && options.inDensity>0
|
||||
|
|
Loading…
Reference in New Issue