don't set shrink too low
This commit is contained in:
parent
f1df91eebb
commit
e4996d8dce
@ -353,6 +353,7 @@ vips_interpolate_bicubic_interpolate( VipsInterpolate *interpolate,
|
||||
bicubic_int_tab<unsigned char, 0, UCHAR_MAX>(
|
||||
out, p, bands, lskip,
|
||||
cxi, cyi );
|
||||
|
||||
/*
|
||||
|
||||
Handy for benchmarking
|
||||
@ -360,11 +361,13 @@ vips_interpolate_bicubic_interpolate( VipsInterpolate *interpolate,
|
||||
bicubic_float_tab<unsigned char>(
|
||||
out, p, bands, lskip,
|
||||
cxf, cyf );
|
||||
|
||||
bicubic_notab<unsigned char>(
|
||||
out, p, bands, lskip,
|
||||
x - ix, y - iy );
|
||||
|
||||
*/
|
||||
|
||||
break;
|
||||
|
||||
case VIPS_FORMAT_CHAR:
|
||||
|
@ -229,7 +229,8 @@ calculate_shrink( VipsImage *im, double *residual,
|
||||
*
|
||||
* We want to shrink by less for interpolators with larger windows.
|
||||
*/
|
||||
int shrink = floor( factor2 ) / VIPS_MAX( window_size / 2, 1 );
|
||||
int shrink = VIPS_MAX( 1,
|
||||
floor( factor2 ) / VIPS_MAX( 1, window_size / 2 ) );
|
||||
|
||||
if( residual &&
|
||||
direction == VIPS_DIRECTION_HORIZONTAL ) {
|
||||
|
Loading…
Reference in New Issue
Block a user