diff --git a/ChangeLog b/ChangeLog index 410f6bba..47fc40e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ - configure test for g++ 7.2 and composite.cpp - don't Ping in magickload, too unreliable - ensure WebP can add metadata when compiled with libwebpmux [lovell] +- improve accuracy of vector path convolution [felixbuenemann] 12/2/18 started 8.6.3 - use pkg-config to find libjpeg, if we can diff --git a/libvips/convolution/convi.c b/libvips/convolution/convi.c index 18b812cf..527c15e3 100644 --- a/libvips/convolution/convi.c +++ b/libvips/convolution/convi.c @@ -909,7 +909,7 @@ vips_convi_intize( VipsConvi *convi, VipsImage *M ) * later, so 1.0 (for example) would become 128, which is outside * signed 8 bit. */ - shift = ceil( log2( mx + 1 ) ); + shift = ceil( log2( mx ) + 1 ); /* We need to sum n_points, so we have to shift right before adding a * new value to make sure we have enough range.