下采样冲突解决

This commit is contained in:
24186 2024-05-02 11:01:28 +08:00
parent 0958d3df94
commit 2a932ac01d
3 changed files with 3 additions and 3 deletions

View File

@ -43,7 +43,7 @@ export class ParseImageUtil implements IParseImage<PixelMap> {
editable: true,
desiredSize: defaultSize
};
if(request.downsampType.getName()!==undefined && request.downsampType.getName()!=='DownsampleNone'){
if(request?.downsampType.getName()!==undefined && request?.downsampType.getName()!=='DownsampleNone'){
const b:ESObject = new Downsampler().calculateScaling(imageinfo, hValue, wValue,request)
opts= {
editable: true,

View File

@ -53,7 +53,7 @@ export class GIFParseImpl implements IParseGif {
imageSource.getImageInfo().then((value) => {
hValue = Math.round(value.size.height);
wValue = Math.round(value.size.height);
if ( _request.downsampType.getName()!==undefined && _request.downsampType.getName()!=='DownsampleNone') {
if ( _request?.downsampType.getName()!==undefined && _request?.downsampType.getName()!=='DownsampleNone') {
const b: ESObject = new Downsampler().calculateScaling(imageinfo, Math.round(value.size.height), Math.round(value.size.width), _request)
decodeOpts = {
sampleSize: 1,

View File

@ -36,7 +36,7 @@ export class SVGParseImpl implements IParseSvg {
editable: true,
desiredSize: defaultSize
};
if (request.downsampType.getName()!==undefined && request.downsampType.getName()!=='DownsampleNone') {
if (request?.downsampType.getName()!==undefined && request?.downsampType.getName()!=='DownsampleNone') {
const b: ESObject = new Downsampler().calculateScaling(imageInfo, hValue, wValue, option)
opts = {
editable: true,