Merge pull request #1003 from felixbuenemann/fix-convolution-posterization

Fix convolution vector path posterization
This commit is contained in:
John Cupitt 2018-06-13 16:22:39 +01:00 committed by GitHub
commit eac314b4a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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.