if(scaledw<=width && scaledh<=height)
break;
}
- if(scaledw>width || scaledh>height)
+ if(i>=NUMSF)
_throw("tjDecompress2(): Could not scale down to desired image dimensions");
width=scaledw; height=scaledh;
dinfo->scale_num=sf[i].num;
if(scaledw<=width && scaledh<=height)
break;
}
- if(scaledw>width || scaledh>height)
+ if(i>=NUMSF)
_throw("tjDecompressToYUVPlanes(): Could not scale down to desired image dimensions");
if(dinfo->num_components>3)
_throw("tjDecompressToYUVPlanes(): JPEG image must have 3 or fewer components");
if(scaledw<=width && scaledh<=height)
break;
}
- if(scaledw>width || scaledh>height)
+ if(i>=NUMSF)
_throw("tjDecompressToYUV2(): Could not scale down to desired image dimensions");
pw0=tjPlaneWidth(0, width, jpegSubsamp);