降采样代码简化

Signed-off-by: tsm <tianshuangming@h-partners.com>
This commit is contained in:
tsm 2024-09-26 19:04:07 +08:00
parent e086bb8630
commit 9e2af039e1
2 changed files with 3 additions and 2 deletions

View File

@ -35,6 +35,7 @@ import {
} from './model/ImageKnifeData'
import { BusinessError } from '@kit.BasicServicesKit';
import { ImageKnifeLoader } from './ImageKnifeLoader'
import { DownsampleStrategy } from './downsampling/DownsampleStartegy';
export class ImageKnifeDispatcher {
@ -186,7 +187,7 @@ export class ImageKnifeDispatcher {
resName: resName == "" ? undefined : resName,
targetWidth: currentRequest.componentWidth,
targetHeight: currentRequest.componentHeight,
downsampType: currentRequest.imageKnifeOption.downsampleOf,
downsampType: currentRequest.imageKnifeOption.downsampleOf==undefined?DownsampleStrategy.NONE:currentRequest.imageKnifeOption.downsampleOf,
}
if(request.customGetImage == undefined) {

View File

@ -107,6 +107,6 @@ export interface RequestJobRequest {
resName?: string,
targetWidth: number
targetHeight: number
downsampType?: DownsampleStrategy
downsampType: DownsampleStrategy
}