diff --git a/ChangeLog b/ChangeLog index 3cc6530a..06716c46 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,7 @@ - more VipsImage props - added vips_image_write(), old one becomes vips_image_write_to_file() - jpeg read/write copies over XMP data +- handle offset correctly in separable convolutions (thanks Nicolas) 12/9/11 started 7.26.4 - fallback vips_init() diff --git a/TODO b/TODO index 3f55b0c1..e006ab92 100644 --- a/TODO +++ b/TODO @@ -5,8 +5,6 @@ -- nicolas's convsep patch - - add nifti support http://niftilib.sourceforge.net/ diff --git a/libvips/convolution/im_conv.c b/libvips/convolution/im_conv.c index e1671206..21151800 100644 --- a/libvips/convolution/im_conv.c +++ b/libvips/convolution/im_conv.c @@ -65,6 +65,8 @@ * - add array tiling * 9/5/11 * - argh typo in overflow estimation could cause errors + * 15/10/11 Nicolas + * - handle offset correctly in seperable convolutions */ /* @@ -1132,9 +1134,10 @@ im_convsep_raw( IMAGE *in, IMAGE *out, INTMASK *mask ) rmask->xsize = mask->ysize; rmask->ysize = mask->xsize; + rmask->offset = 0.; - if( im_conv_raw( in, t, mask ) || - im_conv_raw( t, out, rmask ) ) + if( im_conv_raw( in, t, rmask ) || + im_conv_raw( t, out, mask ) ) return( -1 ); return( 0 ); diff --git a/libvips/convolution/im_conv_f.c b/libvips/convolution/im_conv_f.c index 3a29b3c2..9af1b048 100644 --- a/libvips/convolution/im_conv_f.c +++ b/libvips/convolution/im_conv_f.c @@ -41,6 +41,8 @@ * 29/10/10 * - get rid of im_convsep_f(), just call this twice, no longer worth * keeping two versions + * 15/10/11 Nicolas + * - handle offset correctly in seperable convolutions */ /* @@ -410,9 +412,10 @@ im_convsep_f_raw( IMAGE *in, IMAGE *out, DOUBLEMASK *mask ) rmask->xsize = mask->ysize; rmask->ysize = mask->xsize; + rmask->offset = 0.; - if( im_conv_f_raw( in, t, mask ) || - im_conv_f_raw( t, out, rmask ) ) + if( im_conv_f_raw( in, t, rmask ) || + im_conv_f_raw( t, out, mask ) ) return( -1 ); return( 0 );