From 85fe00ac4697e593a3e210bb96efead90a307a80 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Mon, 2 Dec 2013 14:08:27 +0000 Subject: [PATCH] stop sdev zero being generated by sharpen --- libvips/arithmetic/add.c | 3 +-- libvips/convolution/sharpen.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/libvips/arithmetic/add.c b/libvips/arithmetic/add.c index 2a91adab..3fd90523 100644 --- a/libvips/arithmetic/add.c +++ b/libvips/arithmetic/add.c @@ -101,7 +101,6 @@ G_DEFINE_TYPE( VipsAdd, vips_add, VIPS_TYPE_BINARY ); static void add_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) { - VipsArithmeticClass *class = VIPS_ARITHMETIC_GET_CLASS( arithmetic ); VipsImage *im = arithmetic->ready[0]; /* Complex just doubles the size. @@ -113,7 +112,7 @@ add_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) int x; /* Add all input types. Keep types here in sync with - * bandfmt_add[] below. + * vips_add_format_table[] below. */ switch( vips_image_get_format( im ) ) { case VIPS_FORMAT_UCHAR: diff --git a/libvips/convolution/sharpen.c b/libvips/convolution/sharpen.c index a71f1973..37eaaa60 100644 --- a/libvips/convolution/sharpen.c +++ b/libvips/convolution/sharpen.c @@ -234,7 +234,7 @@ vips_sharpen_build( VipsObject *object ) /* Stop at 20% of max ... bit mean, but means mask radius is roughly * right. We always sharpen a short, so no point using a float mask. */ - if( vips_gaussmat( &t[1], sharpen->radius / 2, 0.2, + if( vips_gaussmat( &t[1], 1 + sharpen->radius / 2, 0.2, "separable", TRUE, "integer", TRUE, NULL ) )