diff --git a/ChangeLog b/ChangeLog index 4e6dc7bf..bebf1ad4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,9 @@ - switches to disable PPM, Rad and Analyze support - added VIPS_COUNT_PIXELS(), overcomputation tracking +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/doc/libvips-docs.xml b/doc/libvips-docs.xml new file mode 100644 index 00000000..563189e3 --- /dev/null +++ b/doc/libvips-docs.xml @@ -0,0 +1,99 @@ + + + +]> + + + VIPS Reference Manual + + For VIPS 8.2.4. + The latest version of this documentation can be found on the + VIPS website. + + + + + VIPS Overview + + VIPS is a free image processing system. It is good with large + images (images larger than the amount of RAM you have available), with + many CPUs (speed scales linearly to at least 32 threads), for working + with colour, for scientific analysis and for general research + and development. As well as JPEG, TIFF and PNG images, it also + supports scientific formats like FITS, Matlab, Analyze, PFM, + Radiance and OpenSlide. It works on many UNIX-like platforms, + as well as Windows and OS X. VIPS is released under the GNU Library + General Public License (GNU LGPL). + + + + + + + + + + + + + + + Core VIPS API + + + + + + + + + + + + + + + + + + VIPS operation API by section + + + + + + + + + + + + + + + + + Other API (no gtkdoc comments yet) + + + + + + + + Object Hierarchy + + + + + API Index + + + + + + 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; }