oh dear, missing breaks in switch
too much ruby sigh
This commit is contained in:
parent
c76b4893c0
commit
cf1e6e3ef8
@ -122,16 +122,19 @@ vips_resize_int_shrink( VipsResize *resize, double scale )
|
|||||||
else
|
else
|
||||||
switch( resize->kernel ) {
|
switch( resize->kernel ) {
|
||||||
case VIPS_KERNEL_NEAREST:
|
case VIPS_KERNEL_NEAREST:
|
||||||
shrink = 1;
|
shrink = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
case VIPS_KERNEL_LINEAR:
|
case VIPS_KERNEL_LINEAR:
|
||||||
case VIPS_KERNEL_CUBIC:
|
case VIPS_KERNEL_CUBIC:
|
||||||
default:
|
default:
|
||||||
shrink = VIPS_FLOOR( 1.0 / scale );
|
shrink = VIPS_FLOOR( 1.0 / scale );
|
||||||
|
break;
|
||||||
|
|
||||||
case VIPS_KERNEL_LANCZOS2:
|
case VIPS_KERNEL_LANCZOS2:
|
||||||
case VIPS_KERNEL_LANCZOS3:
|
case VIPS_KERNEL_LANCZOS3:
|
||||||
shrink = VIPS_MAX( 1, VIPS_FLOOR( 1.0 / (scale * 2) ) );
|
shrink = VIPS_MAX( 1, VIPS_FLOOR( 1.0 / (scale * 2) ) );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return( shrink );
|
return( shrink );
|
||||||
|
Loading…
Reference in New Issue
Block a user