diff --git a/ChangeLog b/ChangeLog index 68680286..008218d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +24/3/16 started 8.2.4 +- fix nohalo and vsqbs interpolators, thanks Rafael + 27/1/16 started 8.2.3 - fix a crash with SPARC byte-order labq vips images - fix parsing of filenames containing brackets, thanks shilpi230 diff --git a/configure.ac b/configure.ac index cfc15321..a810ec7e 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # also update the version number in the m4 macros below -AC_INIT([vips], [8.2.3], [vipsip@jiscmail.ac.uk]) +AC_INIT([vips], [8.2.4], [vipsip@jiscmail.ac.uk]) # required for gobject-introspection AC_PREREQ(2.62) @@ -18,7 +18,7 @@ AC_CONFIG_MACRO_DIR([m4]) # user-visible library versioning m4_define([vips_major_version], [8]) m4_define([vips_minor_version], [2]) -m4_define([vips_micro_version], [3]) +m4_define([vips_micro_version], [4]) m4_define([vips_version], [vips_major_version.vips_minor_version.vips_micro_version]) @@ -38,7 +38,7 @@ VIPS_VERSION_STRING=$VIPS_VERSION-`date` # binary interface changes not backwards compatible?: reset age to 0 LIBRARY_CURRENT=45 -LIBRARY_REVISION=3 +LIBRARY_REVISION=4 LIBRARY_AGE=3 # patched into include/vips/version.h diff --git a/libvips/resample/nohalo.cpp b/libvips/resample/nohalo.cpp index 01e5cf51..909fbfa9 100644 --- a/libvips/resample/nohalo.cpp +++ b/libvips/resample/nohalo.cpp @@ -1493,8 +1493,8 @@ vips_interpolate_nohalo_interpolate( VipsInterpolate* restrict interpolate, * * It's 2 not 0 since we ask for a window_offset of 2 at the bottom. */ - const int ix = (int) absolute_x; - const int iy = (int) absolute_y; + const int ix = (int) (absolute_x + 0.5); + const int iy = (int) (absolute_y + 0.5); /* * Move the pointer to (the first band of) the top/left pixel of the @@ -1523,8 +1523,8 @@ vips_interpolate_nohalo_interpolate( VipsInterpolate* restrict interpolate, g_assert( ix - 2 >= in->valid.left ); g_assert( iy - 2 >= in->valid.top ); - g_assert( ix + 2 < VIPS_RECT_RIGHT( &in->valid ) ); - g_assert( iy + 2 < VIPS_RECT_BOTTOM( &in->valid ) ); + g_assert( ix + 2 <= VIPS_RECT_RIGHT( &in->valid ) ); + g_assert( iy + 2 <= VIPS_RECT_BOTTOM( &in->valid ) ); /* Confirm that absolute_x and absolute_y are >= 2, see above. */ @@ -1586,7 +1586,7 @@ vips_interpolate_nohalo_class_init( VipsInterpolateNohaloClass *klass ) _( "edge sharpening resampler with halo reduction" ); interpolate_class->interpolate = vips_interpolate_nohalo_interpolate; - interpolate_class->window_size = 5; + interpolate_class->window_size = 6; interpolate_class->window_offset = 2; } diff --git a/libvips/resample/vsqbs.cpp b/libvips/resample/vsqbs.cpp index 77e1ecb4..6595a79a 100644 --- a/libvips/resample/vsqbs.cpp +++ b/libvips/resample/vsqbs.cpp @@ -313,8 +313,8 @@ vips_interpolate_vsqbs_interpolate( VipsInterpolate* restrict interpolate, * * It's 1 not 0 since we ask for a window_offset of 1 at the bottom. */ - const int ix = (int) absolute_x; - const int iy = (int) absolute_y; + const int ix = (int) (absolute_x + 0.5); + const int iy = (int) (absolute_y + 0.5); /* * Move the pointer to (the first band of) the top/left pixel of the @@ -343,8 +343,8 @@ vips_interpolate_vsqbs_interpolate( VipsInterpolate* restrict interpolate, g_assert( ix - 1 >= in->valid.left ); g_assert( iy - 1 >= in->valid.top ); - g_assert( ix + 1 < VIPS_RECT_RIGHT( &in->valid ) ); - g_assert( iy + 1 < VIPS_RECT_BOTTOM( &in->valid ) ); + g_assert( ix + 1 <= VIPS_RECT_RIGHT( &in->valid ) ); + g_assert( iy + 1 <= VIPS_RECT_BOTTOM( &in->valid ) ); /* Confirm that absolute_x and absolute_y are >= 1, see above. */ @@ -405,7 +405,7 @@ vips_interpolate_vsqbs_class_init( VipsInterpolateVsqbsClass *klass ) object_class->description = _( "B-Splines with antialiasing smoothing" ); interpolate_class->interpolate = vips_interpolate_vsqbs_interpolate; - interpolate_class->window_size = 3; + interpolate_class->window_size = 4; interpolate_class->window_offset = 1; }