diff --git a/ChangeLog b/ChangeLog index 25d74457..3254fce7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,8 @@ - vipsthumbnail -o allows absolute file names - much better exif handling for jpg images (thanks Gary) - preserve jpeg app13 (photoshop ipct) +- nearest neighbour goes back to round down ... round to nearest caused a + range of annoying problems, such as strange half-pixels along edges 14/11/12 started 7.30.6 - capture tiff warnings earlier diff --git a/TODO b/TODO index 665ed0c5..3eb9175a 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,8 @@ +- now we've removed round-to-nearest from NN, we need something extra in the + affine transform to displace the input cods + + dx/dy displace output + - check libtool version number, should be binary-compat with 7.30 - quadratic doesn't work for order 3 diff --git a/libvips/resample/interpolate.c b/libvips/resample/interpolate.c index c46f3271..7a1431cd 100644 --- a/libvips/resample/interpolate.c +++ b/libvips/resample/interpolate.c @@ -333,10 +333,8 @@ vips_interpolate_nearest_interpolate( VipsInterpolate *interpolate, { const int ps = IM_IMAGE_SIZEOF_PEL( in->im ); - /* We know x/y are always positive, so we can just (int) them. - */ - const int xi = (int) (x + 0.5); - const int yi = (int) (y + 0.5); + const int xi = (int) x; + const int yi = (int) y; const VipsPel *p = IM_REGION_ADDR( in, xi, yi ); VipsPel *q = (VipsPel *) out;