diff --git a/ChangeLog b/ChangeLog index 4221e5ad..70926961 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ - stop 0-length buffer being passed to imagemagick [lovell] - convert no-profile CMYK to RGB on save [augustocdias] - ensure SVG loader skips input with chars outside x09-x7F range [lovell] +- better mask sizing in gaussmat [johntrunc] 24/1/20 started 8.10.0 - more conformat IIIF output from dzsave [regisrob] diff --git a/libvips/create/gaussmat.c b/libvips/create/gaussmat.c index 4ac21562..a18d1816 100644 --- a/libvips/create/gaussmat.c +++ b/libvips/create/gaussmat.c @@ -129,7 +129,7 @@ vips_gaussmat_build( VipsObject *object ) vips_error( class->nickname, "%s", _( "mask too large" ) ); return( -1 ); } - width = 2 * x - 1; + width = 2 * VIPS_MAX( x - 1, 0 ) + 1; height = gaussmat->separable ? 1 : width; vips_image_init_fields( create->out,